EasyManuals Logo

Omron NJ501-1500 User Manual

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
Page #319 background imageLoading...
Page #319 background image
2-271
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Data Type Conversion Instructions
2
STRING_TO_** (Text String-to-Integer Conversion Group)
The following example for the STRING_TO_DINT instruction is for when In is ‘123456789’.
The valid range of In depends on the data type of Out as shown below:
* Any blank characters (‘ ’) at the beginning of the text string, any zeros at the beginning of the text string, and any
underbars (‘_’) in the text string are not included in the number of bytes.
To convert a text string to a hexadecimal number, use a STRING_TO_** (Text String-to-Bit String
Conversion Group) instruction (page 2-272).
To convert an integer to a text string, 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 Out.
If the value of In is ‘0’, the value of Out is 0.
An error occurs in the following cases. ENO will be FALSE, and Out will not change.
The text string in In does not express a number.
The conversion result exceeds the valid range of the data type of Out.
The text string in In does not end in a NULL character.
Data type of Out Valid range of In (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:=STRING_TO_DINT(‘123456789’);
LD ST
abc
‘123456789’
STRING_TO_DINT
EN ENO
In
‘123456789’
STRING data
123456789
DINT data
In
Out=abc

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
ModelNJ501-1500
CPU TypeIntel Atom
SD Memory Card SlotYes
Power Supply Voltage24 V DC
Power Consumption30 W
Operating Temperature0 to 55 °C
USB PortYes
Power SupplyBuilt-in

Related product manuals