Rockwell Automation 1771-QA Stepper Positioning Assembly User Manual User Manual

Page 92

Advertising
background image

4–14

Example Programs

Publication 1771-UM002A–EN–P – May 2000

Commands are transferred to the stepper controller module by
setting a bit in either the moveset control word, single move control
word or MS preset word. The command bit can be set when the
control word is in either of two locations: in file A of file-to-file
move instructions FFM 0036 or FFM 0033, or in the write block
transfer file R (500-577) where data resides momentarily when
transferred to the stepper controller module. When programming a
1-axis profile, either can be used. When programming a 2-axis or
3-axis profile, bits should be set in file A of the file-to-file move
instruction, not in file R.

The jog moveset containing preset data can be block transferred to
the stepper controller module with either a software jog forward or
jog reverse command or an initialization preset command. This can
be done when rung 12 and either rung 5,6, or 8 are true in the same
scan. In this case the initialization preset command, bit 17 of the MS
preset word, is set in file R (500/17). The software jog forward or
jog reverse command, bit 15 or 14 respectively in the moveset
control word, is set in file A (FFM 0036).

The start command for the positioning profile can be block
transferred to the stepper controller module simultaneously with the
positioning profile moveset. This can be done when rungs 4 and 13
are true in the same scan. In this case, the start bit, bit 00 of the
moveset control word, is set in file R (500/00). The positioning
profile will then be executed independent of the PC processor scan,
once the stepper controller module has received the data.

The other functions such as stop, reset or jog fwd/rev can be initiated
by energizing the appropriate bits in rungs 1-11. The stop and reset
commands can be initiated any time during a positioning sequence,
whereas the initialization preset and jog forward or jog reverse
commands can only be initiated before or after a positioning
sequence.

The status information received from the stepper controller module
by a read block transfer (rung 14) is buffered by the file-to-file move
instruction in rung 15. This is necessary to ensure data integrity
particularly when operating in any electrical noise environment.

The write block transfer data in rung 16 need not be buffered by user
program because the stepper controller module buffers write data
internally.

Rungs 17 and 18 are block transfer time-out rungs. If a write block
transfer is not completed within three seconds, output 011/16 will be
latched on. This can be used to illuminate a warning lamp, etc.
Rung 19 displays status information and has no effect on program
operation.

Advertising