Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
6-99
BKBCD(P)
1
2
3
4
4
6
7
8
6.3 Data conversion instructions
6.3.14 Conversion from block BIN 16-bit data to BCD 4-digit data (BKBCD(P))
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
The range of the device n points from a device designated by , or exceeds the
relevant device. (Error code: 4101)
The data n points from the device designated by is outside the 0 to 9999 range.
(Error code: 4100)
The and devices overlap. (Error code: 4101)
Program Example
(1) The following program converts, when X20 is turned ON, the BIN data stored at D100 to
D102 to BCD and stores the operation result into the area starting from D200.
[Ladder Mode] [List Mode]
[Operation]
S
D
S
S
D
Step
Instruction
Device
BCD
conversion
0
1
0
1
0
1
0 0 0 0
1 1
0
0
1
0
0
1
0 0 0
1
0 0 0
1
0 00
1
0 0
0 0
1 1
0 0
1
0 0 0 0
1
0
0 0 0
0 0 0
1
0
1
0
1
0 0
1 11
0 0 0
0 0 0
1
0 0 0
1
0
1
0
111
0 0
0 0 0 0 1 1 0 0 1 0 0 010 1 0
3D0
D200 BCD 5432
D202 BCD 3210
D201 BCD 4444
D100 BIN 5432
D102 BIN 3210
D101 BIN 4444
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
2000
1000
800
400
200
100
80
40
20
10
8
4
2
1
4000
8000