II. Programs
(Continued)
TABLE 8. Simple Absolute Position Move Program
Port
Bytes
Command
Comments
Initialization Module
Filter Programming Module
c
1F
LTRJ
This command initiates loading the trajectory parameters input buffers
Busy-bit Check Module
d
d
00
2A
HB
LB
These two bytes are the trajectory control word. A 2A hex LB indicates acceleration,
velocity, and position will be loaded and all three parameters are absolute.
d
d
00
00
HB
LB
Acceleration is loaded in two data words. These two bytes are the high data word. In
this case, the acceleration is 0.1 rev/sec
2
.
Busy-bit Check Module
d
d
00
02
HB
LB
acceleration data word (low)
d
d
00
00
HB
LB
velocity is loaded in two data words. These two bytes are the high data word. In this
case, the velocity is 0.2 rev/sec.
Busy-bit Check Module
d
d
34
6E
HB
LB
velocity data word (low)
Busy-bit Check Module
d
d
00
00
HB
LB
Position is loaded in two data words. These two bytes are the high data word. In this
case, the position loaded is eight thousand counts. This results in a move of two
revolutions in the forward direction.
Busy-bit Check Module
d
d
1F
40
HB
LB
position data word (low)
Busy-bit Check Module
c
01
STT
STT must be issued to execute the desired trajectory.
SIMPLE RELATIVE POSITION MOVE
This program demonstrates the programming flow required
to load and execute a relative position move. See
Move:
Independent of the current resting position of the
shaft, the shaft will complete thirty revolutions in the reverse
direction. Total time to complete the move is fifteen seconds.
Total time for acceleration and deceleration is five seconds.
Note:
Target position is the final requested position. If the shaft is stationary,
and motion has not been stopped with a “motor-off” stop module, the
current absolute position of the shaft is the target position. If motion
has been stopped with a “motor-off” stop module, or a position move
has begun, the absolute position that corresponds to the endpoint of
the current trajectory is the target position. Relative position is position
measured relative to the current target position of the shaft. A relative
position move is a move that ends the specified “relative” number of
counts away from the current target position of the shaft. For example,
if the current target position of the shaft is 10 counts, and a relative
position of 30,000 counts is specified, upon completion of the move the
absolute position of the shaft will be 30,010 counts (i.e. 30,000 counts
relative to 10 counts).
Load Trajectory Parameters
The first byte of the trajectory control word, 00 hex, programs
position mode operation. The second byte, 2B hex, indicates
all three trajectory parameters will be loaded. It also indi-
cates both acceleration and velocity will be absolute values
while position will be a relative value.
Trajectory Parameters Calculations
Independent of the current resting position of the shaft, the
shaft will complete thirty revolutions in the reverse direction.
Total time to complete the move is fifteen seconds. Total time
for acceleration and deceleration is five seconds.
The reference system utilizes a one thousand line encoder.
The number of counts for each complete shaft revolution and
the total counts for this position move are determined.
With respect to time, two-thirds of the move is made at
maximum velocity and one-third is made at a velocity equal
to one-half the maximum velocity (Note 7). Therefore, total
counts traveled during acceleration and deceleration periods
is one-fifth the total counts traveled. See
.
AN-693
www.national.com
12