Data Types - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

4.3

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.
Data type
Bit
Word [unsigned]/bit string [16 bits]
Double word [unsigned]/bit string [32 bits]
Word [signed]
Double word [signed]
Single-precision real number
Double-precision real number
*2
Time
String
String [Unicode]
Timer
Retentive timer
Long timer
Long retentive timer
Counter
Long counter
Pointer
*1 If the single-precision real number exceeds the significant digit, 7, the 8th digit is rounded off. If the double-precision real number
exceeds the significant digit, 15, the 16th digit is rounded off.
*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 (Instructions, Standard Functions/Function Blocks)
*3 When using a constant for the time type label, add "T#" at the beginning of the constant.
4 LABELS
40
4.3 Data Types
Description
BOOL
Represents the alternative status, such
as on or off.
WORD
16-bit array
DWORD
32-bit array
INT
Positive and negative integer values
DINT
Positive and negative double-precision
integer values
REAL
Numerical values of decimal places
(single-precision real number values)
Number of significant digits: 7 (6 digits of
decimal places)
LREAL
Numerical values of decimal places
(double-precision real number values)
Number of significant digits: 15 (14 digits
of decimal places)
TIME
Numerical values as day, hour, minute,
second, and millisecond
STRING
Characters represented by ASCII code or
Shift JIS code
WSTRING
Characters represented by Unicode
TIMER
Structure corresponding to the device,
timer (T)
RETENTIVETIMER
Structure corresponding to the device,
retentive timer (ST)
LTIMER
Structure corresponding to the device,
long timer (LT)
LRETENTIVETIMER
Structure corresponding to the device,
timer (LST)
COUNTER
Structure corresponding to the device,
counter (C)
LCOUNTER
Structure corresponding to the device,
counter (LC)
POINTER
Type corresponding to the device, pointer (P)
 MELSEC iQ-R CPU Module User's Manual (Application)
Value range
0 (FALSE), 1 (TRUE)
0 to 65535
0 to 4294967295
-32768 to 32767
-2147483648 to 2147483647
128
-2
E-3.402823+38 to E-1.175495-38,
0, E1.175495-38 to
*1
E3.402823+38
1024
-2
E-1.79769313486231+308 to E-
2.22507385850721-308, 0,
*1
E2.22507385850721-308 to
E1.79769313486231+308
T#-24d20h31m23s648ms to
T#24d20h31m23s647ms
255 one-byte characters
maximum
255 characters maximum
Page 41 Timer and counter data types
Bit
length
1 bit
16 bits
32 bits
16 bits
32 bits
-126
-126
128
to -2
, 0, 2
to 2
32 bits
-1022
-1022
1024
to -2
, 0, 2
to 2
64 bits
32 bits
*3
Variable
Variable

Advertisement

Table of Contents
loading

Table of Contents