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 #271 background imageLoading...
Page #271 background image
6 Programming
6-84
NJ-series CPU Unit Software User’s Manual (W501)
Precautions for Correct UsePrecautions for Correct Use
The order of priority for operators is sometimes different for different standards and manufactur-
ers. Special attention is necessary for the priority of exponent operators. We therefore recom-
mend that you use parentheses to ensure that calculations are performed in the intended order.
Example: For X:= -2**3**4; we recommend that you use the following expression:
X:= ((-2)**3)**4;.
Additional Information
Calculations are performed based on the data types. For example, the result of calculations with
integer data will be integer data. Therefore, if the expression A/B is calculated with INT variables
A = 3 and B = 2, the result would not be 1.5 because all values after the decimal point are trun-
cated. In this case, the expression (A/B)*2 would evaluate to 2 instead of 3.
Data Types for Operator Operands
If all the operands for an operator have the same data type, any data type given as “Supported” in
the following table can be set as operands. However, if an operand with a different data type is set
for the operator, an implicit cast is required. Refer to Implicit Casts on page 6-106 for details on
implicit casting.
OK: Possible
---: A building error will occur.
* Do not use operators to compare text string variables. Use instructions (such as EQascii) instead.
Data type
Assign-
ment
operator
Argu-
ment set-
ting
operator
Numeric
opera-
tors
Modulo-
division
operator
Power
operator
Compari-
son
opera-
tors
Equality
opera-
tors
Logic
opera-
tors
Posi-
tive/neg-
ative
signs
:=
:=
=>
+
*
/
MOD **
<
<=
=>
>
=
<>
NOT
AND
&
OR
XOR
+
Boolean OK OK --- --- --- --- OK OK ---
Bit string OK OK --- --- --- --- OK OK ---
Integer OK OK OK OK OK OK OK --- OK
Real num-
ber
OK OK OK --- OK OK OK --- OK
Duration OK OK --- --- --- --- --- --- OK
Date OK OK --- --- --- --- --- --- ---
Time of
day
OK OK --- --- --- --- --- --- ---
Date and
time
OK OK --- --- --- --- --- --- ---
Text string OK OK --- --- --- ---* ---* --- ---
Enumera-
tion
OK OK --- --- --- --- OK --- ---
Structure
parent
OK OK --- --- --- --- --- --- ---
Array par-
ent
OK OK --- --- --- --- --- --- ---

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