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
(
I
f accumulator
EQ
ual),
INE
(
I
f accumulator
N
ot
E
qual),
ILT
(
I
f accumulator
L
ower
T
han),
IGT
(
I
f
accumulator
G
reater
T
han),
ILE
(
I
f accumulator
L
ower or
E
qual),
IGE
(
I
f accumulator
G
reater or
E
qual),
JBS
(
J
ump if
B
it
S
et) and
JBC
(
J
ump if
B
it
C
lear) 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
1
0
1
Содержание DSC Series
Страница 2: ...THIS PAGE IS INTENTIONALLY LEFT BLANK ...