Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
LD<, AND<, OR<, LD<=, AND<=, OR<=
- 155 -
Cautions
Each command of LD<=, AND<=, and OR<= cannot use a constant for S2. When S2 is a constant, it
operates as LDBIT, ANDBIT, and an ORBIT command, respectively.
Program example
(1) Program to compare the X0 to F data and D3 data.
Coding
No. of
steps
Com-
mand
Device
10 LD< K4X0 D3
13 OUT Y33
10
D3
K4X0
Y33
<
14
(2) Program to compare the BCD value 100 and D3 data.
Coding
No. of
steps
Com-
mand
Device
10 LD M3
11 AND< H100 D3
14 OUT Y33
10 D3
H100
Y33
M3
<
15
(3) Program to compare the BIN value 100 and D3 data.
Coding
No. of
steps
Com-
mand
Device
10 LD M3
11 LD< K100 D3
14 OR M8
15 ANB
16 OUT Y33
10
D3K100
Y33
M3
M8
<
17
(4) Program to compare the D0 and D3 data.
Coding
No. of
steps
Com-
mand
Device
10 LD M3
11 AND M8
12 OR< D0 D3
15 OUT Y33
D3
D0
Y33
M3 M8
10
<=
16