FE MONITOUCH V8 SERIES Reference: Additional Functions page 386

Table of Contents

Advertisement

FORMAT_DATA F0 F1 F2
Function: Conversion from a string to numerical data
This macro is used to convert the string [F1] according to the attributes [F2], and to store the converted
result in [F0].
F1
String (JIS/ASCII)
Available memory
Internal Memory
F0
F1
F2
Range
Value
F0
Target memory: BIN
Source memory: String (ASCII)
F1
0: DEC without sign (decimal)
1: DEC with a negative sign
(decimal)
2: DEC with a positive/negative
sign (decimal)
F2
3: HEX (hexadecimal)
4: OCT (octal)
5: BIN (binary)
6: FLOAT (real number)
0: 1 word
F2 + 1
1: 2 words
0: DEC
F2 + 2
1: BCD
1 - 32: [F2] = 0, 1, 2, 5, or 6
1 - 8: [F2] = 3
F2 + 3
1 - 11: [F2] = 4
0 - 10: [F2] = 0, 1, or 2
F2 + 4
0 - 31: [F2] = 6
0: With zero suppress
F2 + 5
1: Without zero suppress
F0
Numerical data
FORMAT_DATA
PLC1 - PLC8
Memory
: Setting enabled (indirect designation disabled)
: Setting enabled (indirect designation enabled)
The number of words depends on [F2 + 1] (data length).
The number of bytes depends on [F2 + 3] (character count).
32 bytes maximum (16 words)
Character processing LSB → MSB fixed
Format for [F1]
If "DEC with a negative sign" or "FLOAT" is selected for [F2] for
the conversion of a positive value, add a space code (20H) to
the leftmost position of the positive value. Otherwise, an error
will result.
A space code is not included in the number of digits.
Example:
For a string "123" to be converted, add a space to make it as
" 123".
Data length for [F0]
If "FLOAT" is selected for [F2], specify "0".
Data format for [F0]
If "HEX," "OCT," "BIN," or "FLOAT" is selected for [F2], specify
"0".
Number of digits for [F1]
A positive/negative sign and a decimal point are not included in
the number of digits.
Example:
For a string "-12.3" to be converted, the number of digits is three.
Decimal place for [F1]
Example:
For a string "12.34" to be converted, specify two decimal places.
Format for [F1]
Memory Card
Constant
Remarks
23
Macro
23
23-17

Advertisement

Table of Contents
loading

Table of Contents