Tom,
Happy Labor Day Everyone!
I have also attached a few photos of my progress, I will clean up the wiring once all functions are confirmed. I have also uploaded the revised wiring schematic to include the added OPTO7 circuit.
Great. What did you change?
I had the polarity of the micro relay board incorrect, The way we have it wired per the schematic, I was under the impression that Kanalog would supply a 24VDC signal, however the signal that Kanalog supplied to the micro relay board is -24VDC. We (Jim and I) did add another input (OPTO 7+) from the CR1 relay (pin 24) and a -24VDC to the other side of the input (OPTO 7-). When the E-Stop button is depressed it will deenergize the power to the servo contactors, thus shutting down the servos. I have confirmed the proper start-up and button operation, everyone is Happy on those circuits, I can go ahead and clean up those wires and place in their permanent home on the panel.
Will I also have to do SetBit(143) on OPTO 7 input to verify?
You need to configure, test, and tune the entire machine first. Return to post 48.
I will go back and view post 48, and start checking the axis, I clicked on the link in the post, these are the steps that it brought me to. Will I copy the KanalogInitialPID.mot to the C Code ->clipboard button on the Config screen, then load the channel?
Initial Setup/Testing for Analog Amplifiers
There is a starting configuration for KFLOP+Kanalog called KanalogInitialPID.mot in the \KMotion\Motors folder. Load it into an axis channel from the KMotion Configuration Screen. The basic first steps are to verify the hardware:
- check the encoder counts correctly as shown on the KMotion Axis Screen Position (a KFLOP Axis must be configured as Encoder Input with the Input Channel0 set to the channel where the encoder is physically connected)
- check that the DACs can command the Amplifier to control motor speed. Test Console commands like DAC0=200 to Output ~ -1V (with the axis disabled - if any axis is enabled and continuously writing to the DAC any Console Command will be overwritten)
- If steps #1 and #2 above work correctly, enable the Servo using the Step Response Screen. Zero, Enable. The motor should then attempt to weakly hold position.
Configuring DAC and Encoder Channels
I think our software/documents some what over use the word channel which can confusion. There are Motor Axis Channels, DAC Output Channels, and Encoder Input Channels which are all different things. This diagram may help:
KFLOP Functional Diagram
Any KFLOP Motor Axis Channel can be configured to make use of any DAC or any Encoder by specifying the Input and Output channels. See:
Input Channels
The KanalogInitialPID.mot configuration file is an example of a Kanalog Axis using DAC #0 and Encoder #0. If simply loaded into multiple Motor Axis Channels it will configure all the Motor Axis to all use DAC 0 and Encoder 0 as their I/O devices.
So for example for the Second Motor:
- select Axis Channel #1
- load the KanalogInitialPID.mot configuration
- Change the Input Channel and Output Channel settings to the Encoder and DAC you want that motor to use (ie. #1 and #1)
Max Output For DACs
Note the Maximum Output range for the DACs is +/-2047 DAC Counts. Attempting to output larger values will cause a wraparound effect and runaway or following error fault. So set the Max Output to 2047 or less.
Testing Analog Amplifiers
One way to perform a basic test of an Analog Amplifier to see if it is working and likely capable of being driven by a Kanalog DAC Output is to apply a small voltage to the input to see if the motor drives. A 1.5V battery in series with a 1K Ohm resistor is one possible voltage source. The 1K Ohm resistor should limit the current in case a mistake is made. When applied the motor should drive at a controlled 15% (Speed if the drive is in Velocity mode, or torque if in torque mode). Reversing the battery should reverse the motor direction.
Drive Enables - Axis Drift with Servo Disabled - Power up Issues
Unlike digital values, analog values will always have some amount of noise and error on both inputs and outputs. This means that commanding Zero Volts is unlikely to be ever be exactly Zero and some small torque or drift will occur with Zero Volts commanded. The only way to guarantee no motor drive is to disable the Drive.
Kanalog is designed to be precise and linear but not highly accurate (+/- 1% components are used). Absolute accuracy on the servo output is not normally a requirement for good servo control. This is not a problem when the servo is enabled as the servo will command whatever output necessary to hold the desired position. However whenever the servo is disabled the Drive should also be disabled to avoid any motor drive or drift.
The Drive enable signals can be interfaced to KFLOP. Any I/O can be used as the Drive enables are handled in software as a User Program (see the watchenable.c example).
Often the Kanalog Relay Driver Outputs or Opto Isolated Outputs can be used for Drive Enables.
However please note that unfortunately the Kanalog Outputs Power up in an initially undetermined state for several seconds until KFLOP boots up. If this is a problem for your system then another means of keeping the Drives disabled should be used during initial power up. The Kanalog SWE Relay Output Driver is guaranteed to remain disabled until KFLOP fully boots and all Kanalog Outputs are initialized to the off state.