Conversion From Decimal Ascii To Bin 16-Bit Data, Conversion From Decimal Ascii To Bin 32-Bit Data - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Conversion from decimal ASCII to BIN 16-bit data, conversion
from decimal ASCII to BIN 32-bit data
DABIN(P), DDABIN(P)
Basic
High
Process
Redundant Universal
performance
DABIN, DDABIN
DABINP, DDABINP
(S): ASCII data to be converted to BIN value or head number of the devices where the ASCII data is stored (character string)
(D): Head number of the devices where the conversion result will be stored (BIN 16/32 bits)
Setting
Internal device
data
Bit
Word
(S)
(D)
Processing details
■DABIN
• Converts decimal ASCII data stored into the area starting from the device number designated by (S) into BIN 16-bit data,
and stores it in the device number designated by (D).
b15
b8b7
S
ASCII code for ten-thousands place
Sign data
S
+1
ASCII code for hundreds place
ASCII code for thousands place
S
+2
ASCII code for units place
ASCII code for tens place
For example, if the ASCII code "-25108H" is specified for the area starting from (S), the conversion result is stored at (D) as
shown below:
b15
b8b7
S
32
(2)
H
S
+1
31
(1)
H
+2
S
38
(8)
H
• The ASCII data designated by from (S) to (S)+2 can be in the range of from -32768 to 32767.
• The sign "20H" will be stored if the BIN data is positive, and the sign "2DH" will be stored if it is negative. (If other than "20H
" and "2DH" is set, it will be processed as positive data.)
• ASCII code can be set for each position within the range from "30H" to "39H".
• If the ASCII code set for individual positions is "20H" or "00H," it will be processed as "30H".
LCPU
Command
Command
R, ZR
J\
Bit
b0
b15
D
b0
2D
( )
b15
H
D
35
(5)
H
30
(0)
H
indicates an instruction symbol of DABIN/DDABIN.
U\G
Zn
Word
b0
BIN 16 bits
b0
2
5
1
0
8
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
S
D
P
D
S
Constant
Others
$
7
537

Advertisement

Table of Contents
loading

Table of Contents