8. Function Commands
LD<>, AND<>, OR<>
- 157 -
Program example
(1) Program to compare the X0 to 1F data and D3, 4 data.
Coding
No. of
steps
Com-
mand
Device
10 LDD< K8X0 D3
13 OUT Y33
10
D<
D3K8X0
Y33
14
(2) Program to compare the BCD value 18000 and D3, 4 data.
Coding
No. of
steps
Com-
mand
Device
10 LD M3
11
ANDD< H18000
D3
15 OUT Y33
10
D< D3H18000
Y33
M3
16
(3) Program to compare the BIN value -80000 and D3, 4 data.
Coding
No. of
steps
Com-
mand
Device
10 LD M3
11 LDD<
K-80000
D3
15 OR M8
16 ANB
17 OUT Y33
10
D< D3K-80000
Y33
M3
M8
18
(4) Program to compare the D0, 1 data and D3, 4 data.
Coding
No. of
steps
Com-
mand
Device
10 LD M3
11 AND M8
12
ORD<=
D0 D3
15 OUT Y33
10
D<=
D3D0
Y33
M3
M8
16