EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2 Instruction Descriptions
2-258
NJ-series Instructions Reference Manual (W502)
A NULL character (16#00) is placed at the end of Out.
The name of the instruction is determined by the data type of In. For example, if In is the REAL data
type, the instruction is REAL_TO_STRING.
The following example shows the REAL_TO_STRING instruction when In is REAL#1234.567.
If the value of In is 0, infinity, or nonnumeric data, the value of Out is as shown below.
To convert a text string to a real number, use a STRING_TO_** (Text String-to-Real Number Conver-
sion Group) instruction (page 2-274).
To specify the format when you convert a real number to a text string, use the RealToFormatString
instruction (page 2-259) or the LrealToFormatString instruction (page 2-264).
Always use the correct instruction name for the data type of In.
An error occurs in the following case. ENO will be FALSE, and Out will not change.
The number of bytes in the conversion result exceeds the size of the output parameter that is con-
nected to Out.
Item Description
Sign column If In contains a negative value, a minus sign () is added.
If In contains a positive value, a plus sign (+) is not added.
Integer part The integer part is always only one digit.
Decimal point The decimal point is always given even if In is not a decimal number.
Fractional part If In is REAL data, 6 digits are given. If In is LREAL data, 14 digits are given.
Exponent The exponent is always given. “nn” is 2 or 3 digits.
The sign of “nn” is positive (+) if the absolute value of In is 1.0 or higher and
negative () if it is less than 1.0.
Value of In Value of Out
00
+ inf
−∞ inf
Nonnumeric data
‘nan’ or ‘
nan’
Additional Information
Precautions for Correct Use
abc:=REAL_TO_STRING(REAL#1234.567);
LD
ST
abc
REAL#1234.567
REAL_TO_STRING
EN ENO
In
REAL#
1234.567
REAL Data
1.234567e+03’
STRING Data
In
Out=abc

Table of Contents

Related product manuals