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-254
NJ-series Instructions Reference Manual (W502)
The following example for the INT_TO_STRING instruction is for when In is INT#1234.
The valid range of Out depends on the data type of In as shown below:
To convert a text string number to an integer, use a STRING_TO_** (Text String-to-Integer Conversion
Group) instruction (page 2-270).
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.
Data type of In Valid range of Out (maximum number of bytes)
USINT 4 bytes (three single-byte alphanumeric characters plus the
final NULL character)
UINT 6 bytes (five single-byte alphanumeric characters plus the final
NULL character)
UDINT 11 bytes (10 single-byte alphanumeric characters plus the final
NULL character)
ULINT 21 bytes (20 single-byte alphanumeric characters plus the final
NULL character)
SINT 5 bytes (four single-byte alphanumeric characters plus the final
NULL character)
INT 7 bytes (six single-byte alphanumeric characters plus the final
NULL character)
DINT 12 bytes (11 single-byte alphanumeric characters plus the final
NULL character)
LINT 21 bytes (20 single-byte alphanumeric characters plus the final
NULL character)
Additional Information
Precautions for Correct Use
abc:=INT_TO_STRING(INT#1234);
LD
ST
abc
INT#1234
INT_TO_STRING
EN ENO
In
INT data
STRING data
In
Out=abc
INT#1234
‘1234’

Table of Contents

Related product manuals