Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
26 Applied Instructions (Character String Control)
26.2 VAL / Character String to BIN Conversion
625
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)
2) Character string to be converted
a) Number of characters of character string and the numeric range when the decimal point is ignored.
b) Character types used in characters to be converted
3) The device specified by stores the number of all digits. The number of all digits indicates the number
of all characters (including the number, sign and decimal point).
4) The device specified by + 1 stores the number of digits of the decimal part. The number of digits of
the decimal part indicates the number of all characters after the decimal point "." (2EH).
5) The device specified by stores 32-bit binary data converted from a character string with the decimal
point ignored.
For the character string located in the device specified by and later, the "space" (20H) and "0" (30H)
characters between the sign and the first number other than "0" are ignored in the conversion to 32-bit
binary data.
Related instruction
Cautions
1) The instruction is provided in the FX3UC PLC Ver. 2.20 or later.
2) Sign data "space (20H)" or "- (2DH)" must be stored in the first byte (lower order 8 bits of the head device
set in the device specified by ).
Only the ASCII code data "0 (30H)" to "9 (39H)", "space (20H)" and "decimal point (2EH)" can be stored
from the second byte to the "00H" at the end of the character string of the device specified by .
If "- (2DH)" is stored in the second byte or later, an operation error occurs (error code: K6706).
Description
Number of all characters (digits) 2 to 13
Number of characters (digits) of decimal part 0 to 10 and smaller than "number of all digits - 3"
Numeric range when decimal point is
ignored
-2,147,483,648 to 2,147,483,647
Example) "12345.678" to "12345678"
Character type
Sign
Positive numeric value "Space (20H)"
Negative numeric value "-(2DH)"
Decimal point ".(2EH)"
Number "0(30H)" to "9(39H)"
Instruction Description
DESTR Converts binary floating point data into a character string (ASCII codes) with a specified number of digits.
DEVAL Converts a character string (ASCII codes) into binary floating point data.
STR Converts binary data into a character string (ASCII codes).
Sign
05
Number of all digits
Ignored
Number of digits
of decimal part
32-bit binary data
11
8
4213
54321
000
65
Number of all digits
Ignored
Number of digits
of decimal part
32-bit binary data
12
2
421- 3
-654321