7 BASIC INSTRUCTIONS
7.5 Data Conversion Instructions
289
7
• The data in the device specified by (s) can be converted if it is in the range from 0 to 99999999 (BCD).
• The table below shows nibble specification for the data in the device specified by (s) and (d).
Precautions
• Binary data is used in all operations in CPU module including arithmetic operations (+-
), increment and decrement
instructions. When receiving digital switch information in binary-coded decimal (BCD) format into a CPU module, use the
BIN instruction (for converting BCD data into binary data). Furthermore, to output data to seven-segment display unit
handling binary-coded decimal (BCD) data, use the BCD instruction (for converting binary data into BCD data).
Operation error
(s)+1, (s)
Number of digits
Data range
K1X0
1-digit
0 to 9
K2X0
2-digit
00 to 99
K3X0
3-digit
000 to 999
K4X0
4-digit
0000 to 9999
K5X0
5-digit
00000 to 99999
K6X0
6-digit
000000 to 999999
K7X0
7-digit
0000000 to 9999999
K8X0
8-digit
00000000 to 99999999
Error code
(SD0/SD8067)
Description
3401H
The value of each digit of the device specified by (s) is other than 0 to 9. (The data is not binary-coded decimal data.)
DBIN
(s)
(d)
BCD
BIN
9
7
8
6
5
3
4
2
X34 to
X37
X30 to
X33
X24 to
X27
X20 to
X23
X14 to
X17
X10 to
X13
X4 to
X7
X0 to
X3
In case of K8X0
DBIN
CPU module
X0
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......