651
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
26 Character String Control – FNC200 to FNC209
26.2 FNC201 – VAL / Character String to BIN Conversion
21
FNC160-FNC169
Real Time Clock
Control
22
FNC170-FNC179
External Device
23
FNC180
Alternate
Instructions
24
FNC181-FNC189
Others
25
FNC190-FNC199
Block Data
Operation
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC274
Ex-Device
Inverter Comms
5) [ +1, ] stores 16-bit data (bin) converted from a character string with the decimal point ignored.
For the character string located in 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 instructions
Caution
Store sign data, "space (20H)" or "- (2DH)", must be stored in the 1st byte (lower order 8 bits of the head
device set in ).
Only the ASCII code data "0 (30H)" to "9 (39H)", "space (20H)" and "decimal point (2EH)" can be stored from
the 2nd byte to the "00H" at the end of the character string in .
If "- (2DH)" is stored in the 2nd byte or later, an operation error (error code: K6706) occurs.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When the number of characters of the character string to be converted ( and later) is outside the
following ranges (error code: K6706)
• When the number of characters after the decimal point of the character string to be converted ( and
later) is outside the following ranges (error code: K6706)
• When the relationship between the number of all characters in the character string to be converted (
and later) and the number of characters after the decimal point does not satisfy the following (error code:
K6706)
(Number of all characters -3) ≥ Number of characters after the decimal point
• When the sign is set to any ASCII code other than "space" (20H) and "-" (2DH) (error code: K6706)
• When a digit of a number is set to any ASCII code other than "0" (30H) to "9" (39H) or a decimal point "."
(2EH) (error code: K6706)
• When the decimal point "." (2EH) is set two or more times in the character string to be converted (
and later) (error code: K6706)
Instruction Description
ESTR(FNC116)
Converts binary floating point data into a character string (ASCII code) with a specified number
of digits.
EVAL(FNC117) Converts a character string (ASCII code) into binary floating point data.
STR(FNC200) Converts binary data into a character string (ASCII code).
Setting range
16-bit operation 2 to 8
32-bit operation 2 to 13
Setting range
16-bit operation 0 to 5
32-bit operation 0 to 10
D
2
D
2
S
05
11
8
4213
54321
000
65
Total number of digits
Number of digits after
the decimal point
32-bit binary data
12
2
421- 3
-654321
Ignored
Sign
Ignored
Total number of digits
Number of digits after
the decimal point
32-bit binary data
S
S
S
S
S
S