Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
DAND, DANDP
- 237 -
Execution conditions
The execution conditions for the DAND, DANDP are as follows.
Operation command OFF
DAND
ON
Executed per scan
Executed per scan
DANDP
Program example
(1) Program to execute logical AND of the X30 to 47 24-bit data and D99, 100 data when X8 turns
ON, and to transmit the results to M80 to 103.
K6X30DAND D99
X8
10
D99 K6M80
DMOV
Logical AND the X30 to 47 data and D99, 100
data, and store the results in D99 to 100.
Transmit the D99, 100 data to M80 to 103.
Coding
No. of steps Command Device
10 LD X8
11 DAND K6X30 D99
14 DMOV D99
K6M80
17
11 1 011011101101
D10099
B31B30B29B28B27 B26B25B24B23B22 B4 B3 B2 B1 B0
X47 to 30
0
0
0100101110000
X47X46 X34X33X32X31 X30
Interpreted as 0
DAND
00 0 000001100000
D10099
B31B30B29B28B27B26B25B24B23B22 B4 B3 B2 B1 B0
Output0
(2) Program to execute logical AND of the D0, 1 32-bit data and R108, 109 32-bit data when M16
turns ON, and to output the results to Y100 to 11F.
D0DAND R108
M16
10
R108 K8Y100
DMOV
Logical AND the D0, 1 and R108, 109 32-bit data,
and store the results in R108, 109.
Output the R108, 109 data to Y100 to 11F.
Coding
No. of steps Command Device
10 LD M16
11 DAND D0 R108
14 DMOV R108
K8Y100
17