374
22 LABELS
22.4 Data Types
22.4
Data Types
The data types of a label are classified according to the bit length, processing method, and value range.
There are two data types.
• Primitive data type
• Generic data type (ANY type)
Primitive data type
The following table lists the data types included in the primitive data type.
*1 For the number of significant digits and input range of real number data input by the engineering tool, refer to the following.
MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks)
*2 The time type is used in a time data type function of standard functions. For standard functions, refer to the following.
MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks)
*3 For the notation of time, refer to the following.
Data type
Description
Value range
Bit
length
Bit
BOOL
Represents the alternative status, such as
on or off.
0 (FALSE), 1 (TRUE)
1 bit
Word [unsigned]/bit string [16 bits]
WORD
16-bit array
0 to 65535
16 bits
Double word [unsigned]/bit string [32
bits]
DWORD
32-bit array
0 to 4294967295
32 bits
Word [signed]
INT
Positive and negative integer values
-32768 to 32767
16 bits
Double word [signed]
DINT
Positive and negative double-precision
integer values
-2147483648 to 2147483647
32 bits
Single-precision real number
REAL
Numerical values of decimal places (single-
precision real number values)
-2
128
to -2
-126
, 0, 2
-126
to 2
128
E-3.38 to E-1.175495-
38, 0, E1.175495-38 to
E3.38
32 bits
Double-precision real number
LREAL
Numerical values of decimal places
(double-precision real number values)
-2
1024
to -2
-1022
, 0, 2
-1022
to 2
1024
E-1.7976931308 to E-
2.22507385850721-308, 0,
E2.22507385850721-308 to
E1.7976931308
64 bits
Time
TIME
Numerical values as day, hour, minute,
second, and millisecond
T#-24d20h31m23s648ms to
T#24d20h31m23s647ms
32 bits
String
STRING
Characters represented by ASCII code or
Shift JIS code
255 one-byte characters
maximum
Variable
String [Unicode]
WSTRING
Characters represented by Unicode
255 characters maximum
Variable
Timer
TIMER
Structure corresponding to the device,
timer (T)
Page 375 Timer and counter data types
Retentive timer
RETENTIVETIMER
Structure corresponding to the device,
retentive timer (ST)
Long timer
LTIMER
Structure corresponding to the device, long
timer (LT)
Long retentive timer
LRETENTIVETIMER
Structure corresponding to the device,
timer (LST)
Counter
COUNTER
Structure corresponding to the device,
counter (C)
Long counter
LCOUNTER
Structure corresponding to the device,
counter (LC)
Pointer
POINTER
Type corresponding to the device, pointer (P) (
Summary of Contents for MELSEC iQ-R-R00CPU
Page 2: ......
Page 151: ...9 MONITOR FUNCTION 9 1 Real Time Monitor Function 149 9 MEMO ...
Page 323: ...18 SEQUENCE SCAN SYNCHRONIZATION SAMPLING FUNCTION 321 18 MEMO ...
Page 330: ...328 20 ROUTING SETTING 20 3 Precautions MEMO ...
Page 423: ...26 BASIC CONCEPT 26 8 State Transition of the Redundant System 421 26 MEMO ...
Page 1014: ...1012 APPX Appendix 15 Added and Enhanced Functions MEMO ...
Page 1027: ......