6.3.14 16-Bit Bin Block Data To 4-Digit Bcd Block Data Conversion - Mitsubishi MELSEC-Q Series Programming Manual

Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

BKBCD
Function
(1) Converts the BIN data (0 to 9999) n points from the device specified for
and stores the results to the device specified for
Must always be "0".
s
s
+1
s
+2
s
+(n 2)
+(n 1)
s
d
d
+1
d
+2
d
+(n 2)
d
+(n 1)
Operation Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The range of n points from the device specified for
corresponding device.
• The data n points from the device specified for
code: 4100)
• The device ranges of
6.3 Data Conversion Instructions
6-98

6.3.14 16-bit BIN block data to 4-digit BCD block data conversion

BIN 1234
0
0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
BIN 5678
0
0 0 1 0 1 1 0 0 0 1 0 1 1 1 0
BIN 1545
0
0 0 0 0 1 1 0 0 0 0 0 1 0 0 1
BIN 4321
0
0 0 1 0 0 0 0 1 1 1 0 0 0 0 1
BIN 5555
0
0 0 1 0 1 0 1 1 0 1 1 0 0 1 1
BCD conversion
BCD 1234
0
0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
BCD 5678
0
1 0 1 0 1 1 0 0 1 1 1 1 0 0 0
BCD 1545
0
0 0 1 0 1 0 1 0 1 0 0 0 1 0 1
BCD 4321
0
1 0 0 0 0 1 1 0 0 1 0 0 0 0 1
BCD 5555
0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
and
s
d
and the following devices.
d
n
n
,
exceeds the
s
d
is outside the range of 0 to 9999. (Error
s
overlap.
to the BCD data,
s
(Error code: 4101)
(Error code: 4101)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qcpu

Table of Contents