6 - 58 6 - 58
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
[Operation Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The data at
S
was not in the 0 to 9999 range when the BCD instruction was issued.
(Error code: 4100)
• The data at
S
+1 and
S
was not in the 0 to 99999999 range when the DBCD instruction was
issued. (Error code: 4100)
[Program Example]
(1) The following program outputs the present value of C4 from Y20 to Y2F to the BCD display
device.
PLC Output Module
0101 0110 0111 1000
Output power
supply
7-element display unit
8000
4000
2000
1000
800
400
200
100
80
40
20
10
8
4
2
1
Y27
Y26
Y25
Y24
Y23
Y22
Y21
Y20
Y2B
Y2A
Y29
Y28
Y2F
Y2E
Y2D
Y2C
COM
[Ladder Mode] [List Mode]
Steps
Instruction
Device
(2) The following program outputs 32-bit data from D0 to D1 to Y40 to Y67.
PLC Output Module
Output
power
supply
7-element displa
unit
Y67 to Y64 Y63 to Y60 Y5F to Y5C Y5B to Y58 Y57 to Y54 Y53 to Y50 Y4F to Y4C Y4B to Y48 Y47 to Y44 Y43 to Y40
[Ladder Mode] [List Mode]
Steps
Instruction
Device
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com