Conditional testing (cr, tr) (q drives only), Data register assignments, Read-only data registers: a - z – Applied Motion RS-232 User Manual

Page 229

Advertising
background image

229

920-0002 Rev. I

2/2013

Host Command Reference

Conditional Testing (CR, TR) (Q drives only)

When constructing complex programs it is usually necessary to do some conditional processing to affect

program flow. Two commands are available for evaluating a data register for conditional processing, the TR (Test
Register) and CR (Compare Register) commands. The TR command will compare the “First” value of a given
data register against a “Second” immediate value. The CR command compares the “First” value of a given data
register against the “Second” value of another data register. When using the TR and CR commands an internal
“Condition” register is set with the result. The result can be:

“True”

the “First” value is either positive or negative

“False”

the “First” value is not a value (it’s zero)

“Zero”

the “First” value equals “0”

“Positive”

the “First” value is “positive”

“Negative”

the “First” value is “negative”

“Greater Than”

the “First” value is more positive than the “Second” value

“Less Than”

the “First” value is more negative than the “Second” value

“Equal to”

the “First” and “Second” values are equal

“Unequal to”

the “First” and “Second’ values are not equal

NOTE: The QJ (Queue Jump) command is designed to use the “Condition Codes” above for jumping. The

Condition Code can also be accessed via the “h” register.

Data Register Assignments

What follows is a listing of all the data registers available with Applied Motion drives. In the tables below,

“Ch.” denotes the data register’s character assignment, and “Description” gives the name of the data register. The
column “3-digit” denotes the register’s 3-digit equivalent numerical assignment (see PR command, bit 5); “Data
Type” designates whether the data register is a 16-bit word (Short) or a 32-bit word (Long); “Units” shows how a
data register’s contents are used by the drive; and, “Compatibility” shows which drives can make use of the given
register.

NOTE: When programming a Q drive with the Q Programmer software only the character assignment

of the register can be used. When communicating to a Q drive via one of its serial ports, either the character
assignment or the 3-digit numerical assignment can be used.

Read-Only data registers: a - z

Many of the Read-Only data registers can be read with a specific command. In the tables below, associated

commands are shown in parentheses in the “Description” column.

Ch. Description

3-digit

Data Type Units

Compatibility

a

Analog Command value (IA)

049

Short

BLu, SV, STAC6, ST-Q/Si:
32760 = +10V; -32760 = -10V
ST-S, STM:
16383 = +5V; 0 = 0V*

All drives

*Note that the “a” register is affected by the AV (Analog Offset) command, so the range may vary beyond 0
to 16383.

b

Queue Line Number

050

Short

Line # 1 - 62

Q drives only

Advertising
This manual is related to the following products: