Data Types
The TeSys Tera system supports the following Modbus RTU data types:
Name |
Description |
Range |
---|---|---|
INT16 |
16-bit signed integer (1 word) |
-32768...+32767 |
UINT16 |
16-bit unsigned integer (1 word) |
0...65535 |
UINT32 |
32-bit unsigned integer (2 words) |
0...4 294 967 295 |
UINT64 |
64-bit unsigned integer (4 words) |
0...18 446 744 073 709 600 000 |
BOOL |
1-bit data |
0–1 |
ASCII |
String of 8-bit alphanumeric character |
Table of ASCII characters |
BITMAP |
16-bit field (1 word) |
– |
INT16, UINT16, and ASCII data are transmitted with big-endian coding by default:
-
The most significant byte is transmitted first.
-
The least significant byte is transmitted second.
UINT32 and UINT64 data are transmitted with big-endian coding by default:
-
The most significant byte of the most significant word is transmitted first.
-
The least significant byte of the most significant word is transmitted second, and so on.
The byte format setting can be changed to little-endian, refer to Modbus RTU Port Settings.
Endianness
Endianness is the order in which bytes within a word of digital data are transmitted through a data communication medium. Endianness is represented in two ways:
-
Big Endian:
A big-endian system stores the most significant byte at the smallest memory address and the least significant byte at the largest memory address.
-
Little Endian:
A little-endian system stores the most significant byte at the largest memory address and the least significant byte at the smallest memory address.
Example of Endianness
Data Type | Value | Value in Hexadecimal | Big-endian | Little-endian |
---|---|---|---|---|
UINT16/INT16 | 1000 | 03E8 | 03 E8 | E8 03 |
UINT32/INT32 | 70000 | 00011170 | 00 01 11 70 | 70 11 01 00 |
UINT64/INT64 | 100000 | 00000000000186A0 | 00 00 00 00 00 01 86 A0 | A0 86 01 00 00 00 00 00 |
Date and Time
The date and time in data logs is coded in four UINT16 data.Data | Type | Range | Description |
---|---|---|---|
1 | UINT16 | 0x01–0x1F | MSB: Day |
0x01–0x0C | LSB: Month | ||
2 | UINT16 | 0x00–0x63 | MSB:
Year
0–99 (0x00–0x63) corresponds to years 2000 to 2099 For example, 0x17 (23) corresponds to year 2023 |
0x00–0x17 | LSB: Hours | ||
3 | UINT16 | 0x00–0x3B | MSB: Minutes |
0x00–0x3B | LSB: Seconds | ||
4 | UINT16 | 0x0000–0x03E7 |
Milliseconds |
For setting date and time, refer to the Real-Time Clock (RTC) Settings.
Modbus Register
The address of register number n is n-1. The tables detailed in the following parts of this document provides both register numbers (in decimal format) and corresponding addresses (in hexadecimal format).
For example, the address of register number 20 is shown in the following table:
Data |
Address (Decimal) |
Address (Hexadecimal) |
---|---|---|
20 |
19 |
0x0013 |