23 Macro
23-21
23
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].
Available memory
: Setting enabled (indirect designation disabled)
: Setting enabled (indirect designation enabled)
Range
Internal Memory
PLC1 - PLC8
Memory
Memory Card
Constant
F0
F1
F2
String (JIS/ASCII)
Numerical data
FORMAT_STR
F1
F0
Value
Remarks
F0
Target memory: String (ASCII code)
The number of bytes depends on [F2 + 3] (character count).
32 bytes maximum (16 words)
Character processing LSB
→
MSB fixed
F1
Source memory: BIN
The number of words depends on [F2 + 1] (data length).
F2
0: DEC without sign (decimal)
1: DEC with a negative sign
(decimal)
2: DEC with a positive/negative sign
(decimal)
3: HEX (hexadecimal)
4: OCT (octal)
5: BIN (binary)
6: FLOAT (real number)
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”.
F2 + 1
0: 1 word
1: 2 words
Data length for [F1]
If “FLOAT” is selected for [F2], specify “0”.
F2 + 2
0: DEC
1: BCD
Data format for [F1]
If “HEX,” “OCT,” “BIN,” or “FLOAT” is selected for [F2],
specify “0”.
F2 + 3
1 to 32: [F2] = 0, 1, 2, 5, or 6
1 to 8:
[F2] = 3
1 to 11: [F2] = 4
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.
F2 + 4
0 to 10: [F2] = 0, 1, or 2
0 to 31: [F2] = 6
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.
Summary of Contents for MONITOUCH V8 SERIES
Page 1: ...Reference Additional Functions V8series...
Page 57: ...2 Global Overlap 2 12 Please use this page freely...
Page 101: ...7 2 Panel Meter Extended 7 18 Please use this page freely...
Page 123: ...9 2 Acknowledge Function 9 18 Please use this page freely...
Page 127: ...10 RGB Display touch switch emulation 10 4 Please use this page freely...
Page 187: ...14 3 Addition of Titles to a CSV File Sampling Data 14 20 Please use this page freely...
Page 199: ...15 Item Show Hide Function 15 12 Please use this page freely...
Page 213: ...16 FTP Server 16 14 ls command This command is used to display the names of files and folders...
Page 221: ...16 FTP Server 16 22 Please use this page freely...
Page 233: ...17 2 Two Ethernet Ports 17 12 Please use this page freely...
Page 241: ...18 Network Camera 18 8 5 The Live view window is displayed...
Page 261: ...18 Network Camera 18 28 Please use this page freely...
Page 327: ...20 MES Interface Function 20 38 6 The table is created...
Page 369: ...22 Security Function 22 12 Please use this page freely...
Page 429: ...24 Tag 24 24 Please use this page freely...
Page 491: ...26 6 USB FDD Floppy Disk Drive 26 14 Please use this page freely...
Page 503: ...27 Ladder Transfer via USB or Ethernet 27 12 Please use this page freely...