FE MONITOUCH V8 SERIES Reference: Additional Functions page 390

Table of Contents

Advertisement

FORMAT_STR F0 F1 F2
Function: Conversion from numerical data to a string
This macro is used to convert the numerical data [F1] according to the attributes [F2], and to store the
converted result in [F0].
F1
Numerical data
Available memory
Internal Memory
F0
F1
F2
Range
Value
Target memory: String (ASCII code)
F0
F1
Source memory: BIN
0: DEC without sign (decimal)
1: DEC with a negative sign
(decimal)
2: DEC with a positive/negative sign
F2
(decimal)
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 to 32:
[F2] = 0, 1, 2, 5, or 6
1 to 8:
[F2] = 3
1 to 11:
[F2] = 4
F2 + 3
0 to 10:
[F2] = 0, 1, or 2
0 to 31:
[F2] = 6
F2 + 4
F0
String (JIS/ASCII)
FORMAT_STR
PLC1 - PLC8
Memory
: Setting enabled (indirect designation disabled)
: Setting enabled (indirect designation enabled)
The number of bytes depends on [F2 + 3] (character count).
32 bytes maximum (16 words)
Character processing LSB → MSB fixed
The number of words depends on [F2 + 1] (data length).
Format for [F1]
If "DEC with a negative sign" or "FLOAT" is selected for [F2]
and the converted result is a positive value, a space code
(20H) is added to the leftmost byte of the positive value.
Example:
For numerical data "123" to be converted, a space is added
to provide a converted result as " 123".
Data length for [F1]
If "FLOAT" is selected for [F2], specify "0".
Data format for [F1]
If "HEX," "OCT," "BIN," or "FLOAT" is selected for [F2],
specify "0".
Number of digits for [F0]
A positive/negative sign and a decimal point are not included
in the number of digits.
If the number of digits specified for [F2 + 3] is smaller than
that of the converted string, the result is given as a hyphen
"-".
Example:
For a string "-12.3" as the converted result, the number of
digits is three.
Decimal place for [F0]
Example:
For a string "12.34" as the converted result, the number of
digits is four and two decimal places are given.
Memory Card
Constant
Remarks
23
Macro
23
23-21

Advertisement

Table of Contents
loading

Table of Contents