Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
26 Applied Instructions (Character String Control)
26.2 VAL / Character String to BIN Conversion
627
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Program examples
1) In the program below, the character string data stored in D20 to D22 is regarded as an integer value,
converted into a binary value, and stored in D0 when X000 is set to ON.
2) In the program below, the character string data stored in D20 to D24 is regarded as an integer value,
converted into a binary value, and stored in D0 when X000 is set to ON.
X000
-1654
6
2
b15 b8 b7 b0
D20 31H(1)
2EH(.)
2DH(-)
36H(6)
34H(4) 35H(5)
D0
D11
Number of all digits
Number of digits of decimal part
"00H" is stored here.
00H
VALP
EN ENO
d1
d2
s
D20 D10
D0
[ Structured ladder/FBD] [ST]
VALP(X000,D20,D10,D0);
D21
D22
D23
D10
DVALP
EN ENO
d1
d2
s
D20 D10
D0
X000
[Structured ladder/FBD] [ST]
DVALP(X000,D20,D10,D0);
10
3
b15 b8 b7 b0
D20 37H(7)
31H(1)
20H(Space)
39H(9)
30H(0) 30H(0)
D0
D10 Number of all digits
Number of digits of decimal part
36H(6) 2EH(.)
31H(1) 31H(1)
79100611
D1 D0
"00H" is stored here.
00H
D11
D21
D22
D23
D24
D25