7. APPLICATION INSTRUCTIONS
7
−
5
MELSEC-A
Program Examples WAND
(1) Program which masks the digit of tens (the second digit from the right), among
the BCD four digits of D10, and sets it to 0 when XA turns on.
(2) Program which performs logical product of the data of X10 to 1B and the data of
D33, and outputs the result to the Y30 to 3B when XA turns on.
(D10) = 1234
→
1204
X00A
0
P
H
WAND FF0F D10
•
Coding
0 LD
X00A
1 WANDP HFF0F D10
6 END
X00A
0
P
K3
WAND X010 D33
P
K3
MOV D33 Y030
Logical product of the data of X10 to 1B and the
data of D33 is performed and the result is stored
into D33.
Data of D33 is output to the Y30 to 3F.
•
Coding
0 LD
X00A
1 WANDP K3X010 D33
6 MOVP D33
K3Y030
11
END
Regarded as 0.
Set to 0.
Summary of Contents for MELSEC-A series
Page 1: ......
Page 2: ......
Page 13: ...A 11 MEMO...
Page 505: ...APPENDICES APP 100 MELSEC A MEMO...
Page 507: ......
Page 508: ......