Configuring KMotion Step and Direction Outputs
KMotion supports connection to motor amplifiers that utilize step and direction inputs to control the motion. Step and direction motor amplifiers are typically used with stepper motors with or without micro-stepping capability. Each "step" causes the motor amplifier to advance the motor position one step in the direction specified by the "Direction" signal. Only two digital output signals are required for this interface. Fine micro-stepping resolution combined with high motor RPM can result in step rates in the megahertz. For example, a 200 step/rev stepping motor with 128:1 micro-stepping running at 3000 RPM requires:
3000 RPM / 60 Sec/Min * 200 steps/rev * 128Ásteps/full step = 1.28 MHz Ásteps/sec
KMotion has 4 axes of Step and Direction Generation on board. Output pulses up to 2.5 MHz can be generated.
The 4 Axes of Step and Direction outputs are hard wired to IO bits 8 through 15. If an axis channel is selected as a Step and Direction axis, the corresponding 2 output pins will be automatically configured as outputs and they may not be used as general purpose IO.
For KMotion see the table below:
|Signal||IO Bit||JP3 Pin|
To configure an axis as step and direction, on the Configuration Screen select output mode as "Step Dir" and select which of the 4 available Step and Direction generators should be used by setting the appropriate Output Channel 0 setting. See below.
Valid output channel settings 0-7 are allowed for KMotion. Although only 4 Step and Direction generators are available for KMotion, channels 4-7 specify the same generators as channels 0-3 except the output pins are actively driven (high and low) as 3.3V LVTTL signals instead of only driven low as open collector outputs.
If your Step and Direction amplifier has opto coupler inputs driven off +5V then open-collector mode is likely to work better. However if the amplifier has standard logic inputs then LVTTL outputs should work better.
The table below summarizes the modes for KMotion:
|Output Chan 0 Setting||Step & Dir Generator Selected||Output Drive Type|
Note when configuring the motion profile for a Step and Direction Axis the appropriate maximum Velocity, Acceleration, and Jerk should be set in units of micro-steps/sec, micro-steps/sec2, and micro-steps/sec3 respectively.
Programmable Pulse Width
KMotion has a fixed pulse width of 4 (240ns).
Example Configuration for a IM804 Amplifier and Rapidsyn Stepper
Layout - KMotion - Amplifier - Motor
Amplifier Connections - resistors set coil currents (1500 ohms = 3A) and idle standby current (270 ohms = 0.5A). DIP Switches set to ON-OFF-OFF-ON for 128:1 micro-stepping.
Rapidsyn stepper motor. Note coil winding's centertaps are not used.
Axis channel 0 configures as "Step Dir" mode and using Step and Direction generator 0.
Max Velocity 1.6 x 106 steps/sec (1.6e6 / 128 = 12,500 sps = 3750 RPM). Note this (and most) steppers lose most all of their useful torque above several thousand full steps per second. The high speed demonstrated here is intended to demonstrate KMotion's ability to generate high pulse rates.
Max Acceleration 6 x 106 steps/sec2.
Max Jerk 2 x 108 steps/sec3.
1 x 106 count Move performed and data captured over 3 seconds.
Pushing Move downloads all parameters, enables the axis, performs the movement, and plots the result.
Note after the axis has been enabled, digital IO bits 8 and 9 have automatically been configured as outputs for use by Step and Direction Generator #0.
Watch a video showing slow and smooth acceleration of this configuration up to 12,500 full steps per second (1.6 MHz @ 128 microsteps/full step).