7-192
DABIN(P),DDABIN(P)
7.11.4
Conversion from decimal ASCII to BIN 16-bit and 32-bit data
(DABIN(P),DDABIN(P))
DABIN(P),DDABIN(P)
Function
DABIN
(1) Converts decimal ASCII data stored into the area starting from the device number
designated by into BIN 16-bit data, and stores it in the device number designated by .
For example, if the ASCII code " 25108H" is specified for the area starting from , the
conversion result is stored at as shown below:
(2) The ASCII data designated by from to +2 can be in the range of from 32768 to 32767
(3) 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.)
(4) ASCII code can be set for each position within the range from "30H" to "39H".
(5) If the ASCII code set for individual positions is "20H" or "00H," it will be processed as "30H".
: ASCII data to be converted to BIN value or head number of the devices where the ASCII data is stored
(character string)
: Head number of the devices where the conversion result will be stored (BIN 16/32 bits)
Setting
Data
Internal Devices R, ZR J\ U\G Zn Constants
$Other
Bit Word Bit Word
–– –– ––
–– ––
Process
High
performance
Redundant
Universal
Basic
Command
Command
P
D
S
D
S
DABIN,DDABIN
DABINP,DDABINP
indicates an instruction symbol of DABIN/DDABIN.
S
D
S
D
SD
b15 b0
BIN 16 bits
+1
Sign data
ASCII code for ten-thousands place
ASCII code for hundreds place
b15 b8b7 b0
ASCII code for tens placeASCII code for units place
S
D
S
+2
S
ASCII code for thousands place
S
D
b15 b0
+1
2DH ( )32H (2)
35H (5)31H (1)
b15 b8b7 b0
+230H (0)38H
(8)
25108
S
S
S
D
S S