23
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.
of inputs and
outputs
・1 or 0
・TRUE or FALSE
Decimal
number
(integer)
Numeric
operation
Signed
-2147483648 to
+2147483647
Unsigned
number
Single-precision
floating-point values
Double-precision
floating-point values
displayed on
Approx. 2,000 bytes
‘Failure rate’
Programming
Defines the range and type (e.g., integer,
real number, and text string) of data