Transmission Format (Integer, Float And Text Values) - DigiTrace TCONTROL-CONT-03 Manual

Compact microprocessor controller
Hide thumbs Also See for TCONTROL-CONT-03:
Table of Contents

Advertisement

Available languages

Available languages

2.7

Transmission format (integer, float and text values)

Integer values
Example
Float values
Example
H
H
Integer values are transmitted via the Modbus in the following format:
The high byte first, followed by the low byte.
Request of the integer value of address 0x0021, if value "4" (word value
0x0004) is written under this address.
Request: 01 03 0021 0001 (+ 2 bytes CRC16)
Response: 01 03 02 0004 (+ 2 bytes CRC16)
In the case of float values, the Modbus operates with the IEEE-754 standard
format (32bits), the only difference being that byte 1 and 2 are changed over
with byte 3 and 4.
Single-float format (32bit) as per IEEE 754standard
SEEEEEEE
Byte 1
S - sign bit
E - exponent (two's complement)
M - 23bits normalized mantissa
Modbus float format
Modbus address x
MMMMMMMM
Byte 3
Request of the float value of address 0x0035, if value "550.0" (0x44098000 in
IEEE-754 format) is written under this address.
Request: 01 03 0035 0002 (+ 2 bytes CRC16)
Response: 01 03 04 8000 4409 (+ 2 bytes CRC16)
Once transmission from the device is completed, the bytes of the float value
need to be changed over accordingly.
A large number of compilers (e.g. Microsoft Visual C++) store the float
values in the following order:
Float value
Address x
MMMMMMMM
Byte 4
Please find out the way float values are stored in your application.
After the request, it might be necessary to change the bytes over in
the interface program you are using.
2 Protocol description
EMMMMMMM
MMMMMMMM
Byte 2
MMMMMMMM
Byte 4
Address x+1
MMMMMMMM
Byte 3
MMMMMMMM
Byte 3
Modbus address x+1
SEEEEEEE
Byte 1
Address x+2
EMMMMMMM
Byte 2
Byte 4
EMMMMMMM
Byte 2
Address x+3
SEEEEEEE
Byte 1
15

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TCONTROL-CONT-03 and is the answer not in the manual?

Questions and answers

Related Products for DigiTrace TCONTROL-CONT-03

Table of Contents