EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Conversion from Decimal ASCII to bin 16-Bit Data, Conversion from Decimal ASCII to bin 32-Bit Data

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
537
7
Conversion from decimal ASCII to BIN 16-bit data, conversion
from decimal ASCII to BIN 32-bit data
DABIN(P), DDABIN(P)
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).
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:
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".
(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
data
Internal device R, ZR J\ U\G Zn Constant
$
Others
Bit Word Bit Word
(S)  
(D)  
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
P
D
S
D
S
DABIN, DDABIN
DABINP, DDABINP
indicates an instruction symbol of DABIN/DDABIN.
b15 b0
BIN 16 bits
+1
Sign data
ASCII code for ten-thousands place
ASCII code for hundreds place
b15 b8
b7
b0
ASCII code for tens placeASCII code for units place
S
D
S
+2
S
ASCII code for thousands place
b15 b0
+1
2D
H
( )32
H
(2)
35
H
(5)31
H
(1)
b15 b8b7 b0
+2
30
H
(0)38
H
(8)
25108
S
S
S
D

Table of Contents

Related product manuals