Data Types - Hitachi MICRO-EHV+ Applications Manual

Table of Contents

Advertisement

3.6.5

Data types

HX-CODESYS supports below data types.
No.
Data types
BOOL
1
SINT
2
USINT
3
BYTE
4
INT
5
UINT
6
WORD
7
DINT
8
UDINT
9
DWORD
10
REAL
11
TIME
12
13
LREAL
14
STRING
LINT
15
ULINT
16
LWORD
17
DATE
18
DATE_AND_TIME
19
TIME_OF_DAY
20
LTIME
21
WSTRING
22
ARRAY
23
N o t e
If ARRAY type variables are used, several additional variables are used implicitly in the data memory.
Name
Boolean
Short integer
Unsigned short integer
Bit string of length 8
Integer
Unsigned integer
Bit string of length 16
Double integer
Unsigned double integer
Bit string of length 32
Real numbers
Duration
Long reals
Variable-length single-byte
character string
Long integer
Unsigned long integer
Bit string of length 64
Date
Date and time of Day
Time of day
Long duration
Variable-length double-byte
character string
Array
3 – 21
Size
Range
1
0 or 1
8
-128 to 127
8
0 to 255
8
0 to 255 (16#00 to 16#FF)
16
-32,768 to 32,767
16
0 to 65,535
16
0 to 65,535 (16#00 to 16#FFFF)
32
-2,147,483,648 to 2,147,483,647
32
0 to 4,294,967,295
32
0 to 4,294,967,295 (16#00 to 16#FFFFFFFF)
±1.175494351 E-38 to 3.402823466E+38
32
0 to 4,294,967,295 ms
Unit : "d": days, "h": hours, "m": minutes,
32
"s": seconds, "ms": milliseconds
Ex. T#100S12ms, t#0.1s
±1.7976931348623... E+308 to
64
2.2250738585072... E-308
1 to 255 char.
8 n
~ 2
63
63
64
-2
-1
64
64
0 to 2
-1
64
64
0 to 2
-1
year-month-day
Ex. DATE#1996-05-06
32
d#1972-03-29
year-month-day-hour:minute:second
Ex. DATE_AND_TIME#1996-05-06-15:36:30
32
dt#1972-03-29-00:00:00
hour:minute:second
Ex. TIME_OF_DAY#15:36:30.123
32
tod#00:00:00
Unit :"us": microseconds, "ns": nanoseconds
64
Ex. LTIME#1000d15h23m12s34ms2us44ns
16 n
Ex.
in variable declaration
test: ARRAY[0..100] OF WORD;
in user program
test[5]:=20;
Chapter 3
Programming

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents