EasyManua.ls Logo

Scanlab RTC 5 PC Interface Board - 9.1.5 Stepper Motor Control; Output Signals; Reference Movements and Position Initialization

Scanlab RTC 5 PC Interface Board
622 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC
®
5 PC Interface Board
Rev. 1.9 e
9 Programming Peripheral Interfaces
205
innovators for industry
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
(1)
:
You can appropriately change the ENABLE signal
(to switch motor current on or off) during initial-
ization via stepper_init and afterward via
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 stepper_init and
afterward via stepper_control or
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 page 53.
For querying signals, see page 206.
Stepper motor signals are outputted indepen-
dently of any executing lists. A set_end_of_list,
pause_list, set_wait, stop_execution or external
list stops won’t terminate or pause the stepper
motor motion.
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.
(1) Stepper motor signals are available only for RTC
®
5 boards with
DSP version numbers 2 and higher (see get_rtc_version bits
#16-23). For older RTC
®
5 boards, stepper motor commands
will not execute.

Table of Contents

Related product manuals