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-235
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Data Type Conversion Instructions
2
**_TO_*** (Integer-to-Bit String Conversion Group)
**_TO_*** (Integer-to-Bit String
Conversion Group)
These instructions convert integers to bit strings.
* The valid ranges depend on the data types of In and Out. Refer to Function, below, for details.
These instructions convert an integer, In, to a bit string.
The name of the instruction is determined by the data types of In and conversion result Out. For exam-
ple, if In is INT data and Out is WORD data, the name of the instruction is INT_TO_WORD.
The following example for the INT_TO_WORD instruction is for when In is INT#1234.
Instruction Name FB/FUN Graphic expression ST expression
**_TO_*** Integer-to-Bit String
Conversion Group
FUN Out:=**_TO_*** (In);
"**" must be an integer data
type.
"***" must be a bit string
data type.
Variables
Name Meaning I/O Description Valid range Unit Default
In Data to
convert
Input Data to convert *
--- 0
Out Conver-
sion result
Output Conversion result *
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK OK OK OK OK OK OK OK
Out OKOKOKOK
Function
"**" must be an integer data type.
"***" must be a bit string data type.
(@)**_TO_***
EN ENO
In Out
abc:=INT_TO_WORD(INT#-1234);
LD ST
abc
INT#-1234
INT_TO_WORD
EN ENO
In
INT data
WORD data
In
Out=abc
INT#-1234
16#FB2E

Table of Contents

Related product manuals