
Programming manual of IVC series small PLC Chapter 6 Application instructions 198
6.16.10 CMP: Compare and set integer instruction
LAD:
CMP
(S1) (S2) (D)
Applicable to
IVC2L IVC2H
Influenced flag bit
IL: CMP (S1) (S2) (D)
Program steps
7
Operand Type
Applicable elements
Indexed
addressing
S1
INT Constant KnX
KnY
KnM
KnS KnLM KnSM
D
SD
C
T
V
Z
R
√
S2
INT Constant KnX
KnY
KnM
KnS KnLM KnSM
D
SD
C
T
V
Z
R
√
D
BOOL
Y
M
S
Operand description
S1
: data to be comparison values or element SN
S2
: data to be comparison source or element SN
D
: starting element SN of output result
Function description
When the power flow is valid, execute the instruction and compare S1
and S2. Set one of (D)(D+1)(D+2) ON according to the result (<, =, >).
Example
LD m0
CMP 1000
2000 M3
6.16.11 LCMP: Compare and set double integer instruction
LAD:
LCMP (S1) (S2) (D)
Applicable to
IVC2L IVC2H
Influenced flag bit
IL: LCMP (S1) (S2) (D)
Program steps
9
Operand Type
Applicable elements
Indexed
addressing
S1
DINT Constant KnX
KnY
KnM
KnS KnLM KnSM
D
SD
C
V
Z
R
√
S2
DINT Constant KnX
KnY
KnM
KnS KnLM KnSM
D
SD
C
V
Z
R
√
D
BOOL
Y
M
S
Operand description
S1
:
comparison parameter 1
S2
:
comparison parameter 2
D
: starting element SN of output result
Function description
When the power flow is valid, execute
the instruction and compare S1 and
S2. Set one of (D)(D+1)(D+2) ON according to the result (<, =, >).
Example
LD
m1
LCMP 200000 300000
M6
Содержание IVC Series
Страница 258: ...Programming manual of IVC series small PLC Chapter 7 SFC tutor 254...
Страница 259: ...Programming manual of IVC series small PLC Chapter 7 SFC tutor 255...
Страница 320: ...Programming manual of IVC series small PLC Chapter 11 Using positioning function 316...
Страница 321: ...Programming manual of IVC series small PLC Chapter 11 Using positioning function 317...
Страница 326: ...Programming manual of IVC series small PLC Chapter 11 Using positioning function 322...
Страница 327: ...Programming manual of IVC series small PLC Chapter 11 Using positioning function 323...
Страница 328: ...Programming manual of IVC series small PLC Chapter 11 Using positioning function 324...
Страница 329: ...Programming manual of IVC series small PLC Chapter 11 Using positioning function 325...