High−level Instructions
3 − 177
Outline Converts ASCII code that expresses decimal digits to 16-bit data that
expresses the equivalent number.
For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction
“P76 (PABIN)” is not available.
Program example
Boolean
Ladder Diagram
Address Instruction
10 F76 ABIN , DT 0 , K 6 , DT 50
S1
D
Trigger
S2
R0
10
11
ST R 0
F 76 (ABIN)
DT 0
K6
DT 50
S1 Starting 16-bit area for ASCII code (source)
S2 16-bit equivalent constant or 16-bit area to specify number of source data bytes
to be converted
D 16-bit area for storing converted data (destination)
Operands
modifier
S1 A A A A A A A A A N/A N/A N/A N/A A
S2 A A A A A A A A A A A A A A
D N/A A A A A A A A A N/A N/A N/A N/A A
(*1) This cannot be used with the FP0 and FP−e.
(*2) This cannot be used with the FP0, FP−e, FP0R, FPΣ, FP−X.
(*3) With the FP0R, FPΣ,FP−X, FP2, FP2SH, and FP10SH, this is I0 to IC.
(*4) With the FP0R, FPΣ,FP−X, FP2, FP2SH, and FP10SH, this is ID.
Explanation of example
Converts ASCII codes (6 bytes) that express decimal digits in data registers DT2 to DT0 to 16-bit data when
trigger R0 turns on. The converted data is stored in data register DT50.
ASCII HEX code
ASCII character
3
0
03
0
0 3
1
12D
DT2 DT1
6 bytes
Source
DT0
In this case, this position should
be set to “SPACE” or “0”.
·· ·
Decimal data
Bit position
·····
K−100
15 1211 8 7 4 3 0
DT50
Destination
3030
—
F76
P76
(PABIN)
(ABIN)
ASCII code → 16-bit binary data
A: Available
N/A: Not Available