To_** (Bit String Conversion Group) - Omron NJ501-1500 Reference Manual

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

Advertisement

TO_** (Bit String Conversion
Group)
These instructions convert integers, bit strings, real numbers, and text strings to bit strings.
Instruction
TO_**
Bit String Conver-
sion Group
Variables
Name
Meaning
In
Data to
convert
Out
Conver-
sion result
*1 The valid ranges depend on the data types of In and Out.
*2 If you omit the input parameter, the default value is not applied. A building error will occur.
Bit strings
In
OK OK OK OK OK OK OK OK OK OK OK OK OK OK
Out
OK OK OK OK
Function
These instructions convert the integer, bit string, real number, or text string in In to a bit string.
The name of the instruction is determined by the data type of conversion result Out. For example, if Out
is the WORD data type, the instruction is TO_WORD.
The following example for the TO_WORD instruction is for when In is INT#−1234.
LD
INT#-1234
INT data
In
INT#-1234
NJ-series Instructions Reference Manual (W502)
Name
FB/FUN
FUN
I/O
Description
Input
Data to convert
Output
Conversion result
TO_WORD
EN
ENO
In
abc
WORD data
Out=abc
16#FB2E
Graphic expression
(@)TO_**
EN
ENO
In
Out
"**" must be a bit string data type.
Valid range
*1
*1
Integers
ST
abc:=TO_WORD(INT#-1234);
2 Instruction Descriptions
ST expression
Out:=TO_**(In);
"**" must be a bit string data
type.
Unit
Default
*2
---
---
---
Times, durations,
dates, and text strings
2
OK
2-279

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents