Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

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

NJ-series Instructions Reference Manual (W502)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents