Data Types - Omron NX1P Programming Manual

Machine automation controller
Table of Contents

Advertisement

1-3-2

Data Types

For example, you define a variable called L1 (meaning the 1st lamp). It is clear that L1
contains ON/OFF data because L1 is a lamp.
However, if you define a variable called Data1, Data1 may contain a decimal number,
decimal point number, or text string.
The data type defines the type of data that is expressed by a variable.
A variable is a container for data with a name and data type.
Variable = (Name) + (Data type)
Examples of Data Types
The table below lists the data types used for the NX1P. The BOOL data type is used for
ON/OFF data, the INT data type for decimal integers, and the STRING data type for text
strings.
Although both the INT and DINT data types represent decimal integers, they have different
ranges of values.
The WORD data type for bit strings, the DATE_AND_TIME data type for date and time, and
other data types can also be used.
Classification
Boolean
Decimal
number
(integer)
Floating-point
number
Text string
Programming
using
the name
Used for
Data type
ON/OFF status
BOOL
of inputs and
outputs
Numeric
Signed
operation
Unsigned
Real number
REAL
LREAL
Text string
STRING
displayed on
HMI
Defines the range and type (e.g., integer,
real number, and text string) of data
Range of values
0 to 1
INT
-32768 to +32767
DINT
-2147483648 to
+2147483647
UINT
0 to 65535
UDINT
0 to 4294967295
Single-precision
floating-point values
Double-precision
floating-point values
Text strings (UTF-8)
Approx. 2,000 bytes
Notation
・1 or 0
・TRUE or FALSE
+30000, -20000
+12345678, -20000000
60000
20000000
0.15625
1.0000000000000002
'OMRON'
'Failure rate'
23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents