EasyManuals Logo

Omron NJ Series User Manual

Omron NJ Series
668 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 #293 background imageLoading...
Page #293 background image
6 Programming
6-106
NJ-series CPU Unit Software User’s Manual (W501)
Observe the following precautions when you use the ST language in the user program.
Implicit Casts
If the data types of the operands do not match, as shown below, the data types are converted auto-
matically according to the implicit cast rules. If the implicit cast rules are not satisfied, a building error
occurs.
(1) When the data types of the operands in the expression on the right side of the
assignment statement are not the same
Example:
(2) When the data types of the operands on the right and left sides of the assignment
statement are not the same
Example:
(3) When the data types of the operands in statement are not the same
Example:
The casting rules are described for the following three cases.
Casting Rules When the Right-hand Side of an Assignment Statement Is an
Arithmetic Expression
For the right-hand operand, you can use any combination of the data types that are supported for
the operator operand.
Of the operands on the right side, the operand with the highest rank is considered the data type of
the entire side. (Refer to the Data Type Ranking Table given below for the data type ranks.)
If both an unsigned integer and a signed integer with the same ranks exist on the right side, the
data type of the right side is considered to be unsigned.
Data Type Ranking Table:
The higher the rank, the larger the range (absolute values and precision) of numerical values that
the data type can express.
Precautions for the ST Language
Rank Data type
1 USINT, SINT, and BYTE
2 UINT, INT, and WORD
3 REAL
4 DINT, UDINT, and DWORD
5 LREAL
6 LINT, ULINT, and LWORD
A: = INT#10 + SINT#2;
A: = B + C;
REAL INT
CASE A+B OF
INT#1:
def:=INT#10;
INT LINT

Table of Contents

Other manuals for Omron NJ Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ Series and is the answer not in the manual?

Omron NJ Series Specifications

General IconGeneral
Program CapacityUp to 128 MB
SD Card SlotYes
Power Supply Voltage24 VDC
Motion ControlYes
USB Ports1
Operating Temperature0°C to 55°C
Communication InterfacesEthernet/IP, EtherCAT, USB
Safety FunctionOptional
Storage Temperature-20°C to 75°C
Communication PortsUSB
DimensionsVaries by model
WeightVaries by model

Related product manuals