9.1.5 Stepper Motor Control
Output Signals
The signals (ENABLE, DIRECTION and CLOCK) for
controlling up to two stepper motors are outputted
at the "STEPPER MOTOR" connector
• You can appropriately change the ENABLE signal
(to switch motor current on or off) during initial-
ization via
stepper_init
stepper_enable
or stepper_enable_list.
®
• The RTC
5 generates periodic CLOCK signal
pulses (during reference movements via
stepper_init
and set-position movements via
stepper_abs
etc.). With each CLOCK pulse, the
stepper motor executes a single step. You can
adjust the CLOCK signal's pulse period (and
thereby the speed of stepper motor motion)
during initialization via
afterward via
stepper_control
stepper_control_list
(the period is specified in
units of 10 µs cycles).
• You can explicitly set the DIRECTION signal (and
thereby the direction of stepper motor motion)
during reference movements via stepper_init. In
contrast, the DIRECTION signal is internally
controlled during set-position movements via
stepper_abs
etc.: the signal gets set (to HIGH) if
the next CLOCK pulse (in accordance with the
defined set-position value) would increase the
internal position variable. The DIRECTION signal
also remains set for the cycles between two clock
periods and even when the stepper motor has
reached its set position. Only upon an actual
change of direction does the DIRECTION signal
correspondingly change in place of a CLOCK
pulse. Here, output of the next CLOCK pulse will
be delayed by a full CLOCK pulse period
(undefined truncation of CLOCK pulse periods
never occurs).
Notes
• For signal specifications, see
• For querying signals, see
• Stepper motor signals are outputted indepen-
dently of any executing lists. A set_end_of_list,
pause_list, set_wait,
stop_execution
list stops won't terminate or pause the stepper
motor motion.
(1) Stepper motor signals are available only for RTC
DSP version numbers 2 and higher (see
®
#16-23). For older RTC
5 boards, stepper motor commands
will not execute.
®
RTC
5 PC Interface Board
Rev. 1.9 e
9 Programming Peripheral Interfaces
(1)
:
and afterward via
stepper_init
and
or
page
53.
page
206.
or external
®
5 boards with
get_rtc_version
bits
• For changes of direction or pulse period, the new
values won't become active until an already-
begun period is complete. Thus, pulse intervals
will never be shorter than the currently defined
value. For change of direction, an additional
empty period (without CLOCK pulse) gets
inserted.
Reference Movements and Position
Initialization
With stepper_init, you can initiate reference move-
ments to limit switches. Here, the desired direction
can be specified via the Dir parameter. To ensure
that, despite mechanical play or long signal transit
times, the reached end position still won't lie beyond
the limit switch, you can define a tolerance value Tol
that moves the stepper motor in the opposite
direction after reaching the limit switch.
SCANLAB recommends executing a (quick) reference
movement with a short CLOCK pulse period (Period)
first and then a further (shorter but slower) reference
movement with a longer CLOCK pulse period.
A successfully concluded reference movement will set
both the internal position variable (for the current
position) and the internal set-position value to that
defined by the Pos parameter. This will be used as a
reference for future set-position movements. The
reached reference position is offset from the limit
switch position by ±Tol (direction dependent).
If Period = 0 and/or Dir < 0, then the reference
movement will not occur. Instead, the current stepper
motor position will become the new reference
position (with the value newly defined in Pos as the
position variable and set-position value).
Because
stepper_init
always stops a previously
begun stepper motor movement, you could also use
this command as an emergency stop for the stepper
motor.
Parallel execution of reference movements for both
stepper motors is also possible, but cannot be simul-
taneously started through a single command.
205
Need help?
Do you have a question about the RTC 5 PC Interface Board and is the answer not in the manual?