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-256
NJ-series Instructions Reference Manual (W502)
The following example for the WORD_TO_STRING instruction is for when In is WORD#16#1F.
The valid range of Out depends on the data type of In as shown below:
To conver t In to a signed text string, first convert it to a signed integer using a **_TO_*** (Bit String-to-
Integer Conversion Group) instruction (page 2-239) and then use a **_TO_STRING (Integer-to-Text
String Conversion Group) instruction (page 2-253).
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)
BYTE 3 bytes (two single-byte alphanumeric characters plus the
final NULL character)
WORD 5 bytes (four single-byte alphanumeric characters plus
the final NULL character)
DWORD 9 bytes (eight single-byte alphanumeric characters plus
the final NULL character)
LWORD 17 bytes (16 single-byte alphanumeric characters plus
the final NULL character)
Additional Information
Precautions for Correct Use
abc:=WORD_TO_STRING(WORD#16#1F);
LD
ST
abc
WORD#16#1F
WORD_TO_STRING
EN ENO
In
WORD data
STRING data
In Out=abc
WORD#16#1F
‘001F’

Table of Contents

Related product manuals