Delta AS Series Programming Manual page 1026

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

AS Ser ies Pro gra mm in g M anu al
API
Instruction code
2103
D
Device
X
S
D
Data
type
S
D
Symbol
Explanation
_6
1.
This instruction converts the signed decimal ASCII code in S into a signed decimal binary number, and stores the
conversion result in D.
2.
For 16-bit instructions, the operand S occupies three word devices, and the decimal ASCII code in S must be
between -32768 to 32767. If the value in S is a string and does not include the ending character 16#00, the
conversion can be up to 5 digits (excluding the sign).
3.
If the first character is " " (a space), the sign is a positive sign. If the first character is "-", the sign is a negative sign.
Take the string "2345" for example.
6 - 7 4 6
DABIN
P
Y
M
S
T
S : Source value
D : Device where the conversion result is stored
b15
b7
b8
b0
S + 0
" 2 "
" 1 "
S + 1
" 4 "
" 3 "
S + 2
16#00
16#00
b15
b7
b8
b0
S + 0
" 2 "
" - "
S + 1
" 4 "
" 3 "
S + 2
16#00
" 5 "
Operand
S, D
C
HC
D
FR
SM
Pulse instruction
AS
b15
b0
b15
b0
Function
Converting a signed decimal ASCII code
into a signed decimal binary number
SR
E
K
16#
16-bit instruction
32-bit instruction
AS
D
1234
-2345
D
"$"
F
AS

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents