Download Print this page

Converting Decimal Ascii To 16-Bit Binary Data - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Converting decimal ASCII to 16-bit binary data

DABIN(P)(_U)
These instructions convert the decimal ASCII data in the device areas specified by (s) and later to 16-bit binary data, and
store the converted data in the device specified by (d).
Ladder diagram
(s)
FBD/LD
EN
ENO
s
d
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
ASCII data or the head device where the ASCII
data is stored
(d)
DABIN(P)
Head device for storing the converted data
DABIN(P)_U
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
*1 T, ST, C cannot be used.
Processing details
• These instructions convert the decimal ASCII data in the device areas specified by (s) and later to 16-bit binary data, and
store the converted data in the device specified by (d).
b15
∙∙∙
(s)
ASCII 10
4
(s)+1
2
ASCII 10
(s)+2
ASCII 10
0
ASCII S: ASCII code for sign
0
ASCII 10
: ASCII code for ones place
1
ASCII 10
: ASCII code for the tens place
2
ASCII 10
: ASCII code for the hundreds place
3
ASCII 10
: ASCII code for the thousands place
4
ASCII 10
: ASCII code for the ten-thousands place
7 BASIC INSTRUCTIONS
310
7.5 Data Conversion Instructions
(d)
Word
T, ST, C, D, W,
SD, SW, R
*1
b8
b7
∙∙∙
ASCII S
3
ASCII 10
ASCII 10
1
Structured text
ENO:=DABIN(EN,s,d);
ENO:=DABINP(EN,s,d);
Range
Double word Indirect
U\G
Z
LC
b0
b15
(d)
ENO:=DABIN_U(EN,s,d);
ENO:=DABINP_U(EN,s,d);
Data type
Character string
16-bit signed binary
16-bit unsigned binary
Bit
Bit
Constant
specification
LZ
K, H
∙∙∙
b0
BIN16
Data type (label)
ANYSTRING_SINGLE
ANY16_S
ANY16_U
BOOL
BOOL
Others
E
$

Hide quick links:

Advertisement

loading