Cr - compare registers, Command details, Parameter details – Applied Motion RS-232 User Manual
Page 57: Examples

57
920-0002 Rev. I
2/2013
Host Command Reference
CR - Compare Registers
Compatibility: Q drives only
Affects:
Contents of condition code register “h”
See also:
RI, RD, RM, RL, QJ commands
Compare the contents of two data registers. The first data register (Parameter #1) is tested by comparing it
against the data value in the second data register (Parameter #2). The result is a condition code that can be used
for program conditional processing (see QJ command). For Example, if the first data register is greater than the
second the “greater than” flag is set and the QJGx command can be used to create a conditional jump.
Command Details:
Structure
CR(Parameter #1)(Parameter #2)
Type
BUFFERED
Usage
WRITE ONLY
Non-Volatile
NO
Register Access
All data registers
Parameter Details:
Parameter #1
First data register assignment
- units
character
- range
All data register assignments
Parameter #2
Second data register assignment
- units
character
- range
All data register assignments
Examples:
Command
Drive sends
Notes
CRE1
-
Compare data register “E” to data register “1”
QJG5
-
If “E” register is greater than “1” register jump to line 5 of Q segment,
otherwise proceed to next line.