Converting Bcd 4-Digit Data To 16-Bit Binary Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

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

Advertisement

Converting BCD 4-digit data to 16-bit binary data

BIN(P)
RnPCPU
RnCPU RnENCPU
(Process)
These instructions convert the specified BCD 4-digit data to 16-bit binary data.
Ladder
(s)
FBD/LD
EN
ENO
s
d
■Execution condition
Instruction
BIN
BINP
Setting data
■Description, range, data type
Operand
Description
(s)
BCD data or the device where the BCD data is stored
(d)
Device for storing the converted binary data
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB,
FX, FY
(s)
(d)
Processing details
• These instructions convert the BCD 4-digit data (0 to 9999) in the device specified by (s) to 16-bit binary data, and store the
converted data in the device specified by (d).
×10
8
4
1
0
(s)
BCD 9999
15
14
2
2
(d)
BIN 9999
0
0
(1)
(1) Filled with 0s.
6 BASIC INSTRUCTIONS
382
6.6 Data Conversion Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(d)
Execution condition
Word
J\
T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
×10
3
2
2
1
8
4
2
1
8
0
1
1
0
0
1
1
13
12
11
10
9
8
7
2
2
2
2
2
2
2
1
0
0
1
1
1
0
ST
ENO:=BIN(EN,s,d);
ENO:=BINP(EN,s,d);
Range
0 to 9999
U\G, J\,
U3E\(H)G
×10
×10
1
0
4
2
1
8
4
2
0
0
1
1
0
0
BIN
6
5
4
3
2
1
2
2
2
2
2
2
0
0
0
1
1
1
Data type
BCD 4-digit
16-bit signed binary
Bit
Bit
Double word Indirect
specification
Z
LT, LST,
LZ
LC
1
1
0
2
1
Data type (label)
ANY16
ANY16
BOOL
BOOL
Constant
Others
K, H E
$

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents