Qr - queue repeat, Command details, Parameter details – Applied Motion RS-232 User Manual

Page 170: Examples

Advertising
background image

170

920-0002 Rev. I
2/2013

Host Command Reference

QR - Queue Repeat

Compatibility: Q drives only
Affects:

Selected data register

See also:

QJ, QG, RL, RX commands

Causes program segment execution to jump to a previous line number in the queue for a given number of repeat
counts. The repeat count is acquired from a selected Read/Write or User-Defined data register. Jumps past the
end of the queue are ignored. Jumps to subsequent line numbers in the queue will not be repeated. If repeat
count is set to “1” no Jump is performed. The data register selected for the repeat count must be set with the
number of repeat counts prior to using the QR command: use the RX (Register Load - buffered) command to load
the data register with the repeat count. The data register contents are affected by this command and must be re-
loaded before each usage with the QR command.

NOTE: Although data registers A - Z can be used with the QR command it is not recommended. The QR
command eventually destructs the data in a register by decrementing its value each time a jump is made in the
repeat loop and could therefore lead to unexpected results in other parts of the program that make use of data
registers A - Z.

Command Details:

Structure

QR(Parameter #1)(Parameter #2)

Type

BUFFERED

Usage

WRITE ONLY

Non-Volatile

NO

Register Access

None

Parameter Details:

Parameter #1

Data register

- units

register character

- range

A - Z and all user-defined registers (listed in the Data
Registers section)

Parameter #2

Segment line number

- units

integer

- range

1 - 62

Examples:

Command

Drive sends

Notes

RX120

-

Load user register #1 with the value 20

QR15

-

Cause a repeated jump to line 5 of the queue using the value (20) in

data register #1 as the repeat count

Advertising
This manual is related to the following products: