2 Instruction Descriptions
2-264
NJ-series Instructions Reference Manual (W502)
LrealToFormatString
The LrealToFormatString instruction converts a LREAL variable to a text string with the specified for-
mat.
Instruction Name FB/FUN Graphic expression ST expression
LrealToFormat-
String
LREAL-to-Format-
ted Text String
FUN Out:=LrealToFormat-
String(In, Exponent, Sign,
MinLen, DecPlace);
Variables
Name Meaning I/O Description Valid range Unit Default
In Data to
convert
Input
Data to convert
Depends on
data type.
---
0.0
Exponent Exponent TRUE: Exponent
FALSE: No exponent
FALSE
Sign Sign column TRUE: Sign column
FALSE: No sign column
MinLen Minimum
number of
digits
Minimum number of digits in Out
6
DecPlace Precision Number of decimal digits in Out 0 to 15
Out Conversion
result
Output Conversion result 327 bytes max.
(326 single-byte
alphanumeric
characters plus
the final NULL
character)
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK
Exponent OK
Sign OK
MinLen OK
DecPlace OK
Out OK
(@)LrealToFormatString
EN ENO
In Out
Exponent
Sign
MinLen
DecPlace