Operation & Software Manual
224
Direct Drives & Systems
Chapter D: Programming ETEL Doc. - Operation & Software Manual # DSC2P 903 / Ver. F / 3/6/05
14.3.2 Test XAC value: IEQ, INE, ILT, IGT, ILE, IGE, JBS and JBC
IEQ (If accumulator EQual), INE (If accumulator Not Equal), ILT (If accumulator Lower Than), IGT (If
accumulator Greater Than), ILE (If accumulator Lower or Equal), IGE (If accumulator Greater or Equal), JBS
(Jump if Bit Set) and JBC (Jump if Bit Clear) commands realize some tests on the values contained in the
accumulator and pursue the sequence execution according to the test result, at any label.
Remark: If the condition is not met, the sequence execution goes on from the line following the test.
For JBS and JBC commands, <P1> indicates the number of the bit to test. It is reminded that bits
are numbered from the right to the left from 0 to 31.
The instructions given above may not necessarily be directly preceded by the XAC command.
Example:
X3.1=7 ;Attributes the value 7 to the X3 user variable.
XAC.1=5 ;The accumulator is equal to 5 which represents 101 in binary. The bits 0 and 2 of
the accumulator are then set to 1 and all the others to 0.
JBS.1=1,10 ;Jumps to the label 10 if the bit 1 of the accumulator is set to 1. As it is not the case,
the sequence execution goes on from the next line.
ILT.1=X3.1,20 ;The execution of the sequence continues from label 20 because XAC=5 < X3=7.
:10.1
Instructions
:20.1;
JBC.1=1,10 ;The execution of the sequence continues from label 10 because bit 1 of the
accumulator is really equal to 0.
Command <P1> <P2> Comment
IEQ.<axis> = <P1>, <P2>
Reference
value
<label_#>
If XAC=<P1> the execution of the sequence goes on from the label
indicated by <P2>.
INE.<axis> = <P1>, <P2>
Reference
value
<label_#>
If XAC≠<P1> the execution of the sequence goes on from the label
indicated by <P2>.
ILT.<axis> = <P1>, <P2>
Reference
value
<label_#>
If XAC<<P1> the execution of the sequence goes on from the label
indicated by <P2>.
IGT.<axis> = <P1>, <P2>
Reference
value
<label_#>
If XAC><P1> the execution of the sequence goes on from the label
indicated by <P2>.
ILE.<axis> = <P1>, <P2>
Reference
value
<label_#>
If XAC≤<P1> the execution of the sequence goes on from the label
indicated by <P2>.
IGE.<axis> = <P1>, <P2>
Reference
value
<label_#>
If XAC≥<P1> the execution of the sequence goes on from the label
indicated by <P2>.
JBS.<axis> = <P1>, <P2>
N° of the bit
to test
<label_#>
If the bit indicated by <P1> of XAC is set to 1 the execution goes on from
label <P2>.
JBC.<axis> = <P1>, <P2>
N° of the bit
to test
<label_#>
If the bit indicated by <P1> of XAC is set to 0 the execution goes on from
label <P2>.
XAC
Dec. value Bit# 2 Bit# 1 Bit# 0
5 101