Download Print this page

Siemens LMV5 Quick Start Manual page 195

Hide thumbs Also See for LMV5:

Advertisement

Section 8 Modbus
Master-slave principle
Data transmission
Transmission mode (RTU)
Structure of data blocks
Data structure
Checksum (CRC16)
Calculation scheme
Example
LMV5 QSG Rev 4
Communication between Modbus users takes place according to the master-slave principle.
The AZL... always works as a slave.
– The transmission mode used is RTU (Remote Terminal Unit)
– Data are transmitted in binary format (hexadecimal) with 8 bits
– The LSB (least significant bit) is transmitted first
– ASCII operating mode is not supported
All data blocks use the same structure:
Slave address
1 byte
Every data block contains 4 fields:
Slave address
Device address of a certain slave
Function code
Function selection (reading / writing words)
Data field
Contains the following information:
- Word address
- Number of words
- Word value
Checksum
Identification of transmission errors
The checksum (CRC16) is used to detect transmission errors. If, during evaluation, an error
is detected, the relevant device will not respond.
CRC = 0xFFFF
CRC = CRC XOR ByteOfMessage
For (1 through 8)
CRC = SHR (CRC)
if (flag shifted at right = 1)
then
CRC = CRC XOR
0xA001
while (not all ByteOfMessage handled)
The low-byte of the checksum is transmitted first.
Data query: Reading 2 words from address 6 (CRC16 = 0x24A0)
0B
03
Reply: (CRC16 = 0x0561)
0B
03
04
Sec 8 Pg 1
Function code
Data field
1 byte
x byte
00
06
00
00
00
Word 1
Checksum CRC16
2 bytes
else
02
A0
CRC16
42
C8
61
Word 2
CRC16
www.scccombustion.com
24
05

Advertisement

loading