7 Programming
7 - 16
NX-series Safety Control Unit User’s Manual (Z930)
The basic data types are given below.
This section describes the data format for bit string data.
Bit String Data Format
Bit 0 is the least significant bit of a bit string variable. Bit values are expressed as 1 or 0.
Basic Data Types
Type Data type Safety/standard data type Range of values Notation
Boolean
BOOL Standard data type FALSE or TRUE bool#0 or bool#1
FALSE or TRUE
SAFEBOOL
Safety data type
Bit
strings
BYTE
*1*2
*1. The BYTE data type cannot be used for an internal variable.
*2. If you use the BYTE data type for a global variable, you must define an exposed variable.
Standard data type byte#16#00 to
byte#16#FF
byte#2#0101010
byte#2#0101_1010
byte#16#5A
You can use the separator character “_”.
SAFEBYTE Safety data type
WORD
*3
*3. If you use the WORD data type for a global variable, you must define an exposed variable or use a constant.
Standard data type word#16#0000 to
word#16#FFFF
SAFEWORD
*4
*4. If you use the SAFEWORD, TIME, or SAFETIME data type for a global variable, you must set a constant.
Safety data type
Integers
INT Standard data type int#−32768 to int#32767 100
int#100
int#2#00000000_1100100
int#16#64
-100
SAFEINT Safety data type
DINT Standard data type dint#-2147483648 to
dint#2147483647
SAFEDINT
Safety data type
Dura-
tions
TIME
*4
Standard data type t#0ms(t#0d0h0m0s0ms)
to
t#4294967295ms(t#49d
17h02m47s295ms)
t#3000ms
SAFETIME
*4
Safety data type
Bit String Data Format
Bit 7
Bit 0
0BYTE#16#3B 0 1 1 1 0 1 1