Physical overview
Layer | ISO-OSI Model | |
7 | Application | MODBUS Application Protocol |
6 | Presentation | not defined |
5 | Session | not defined |
4 | Transport | not defined |
3 | Network | not defined |
2 | Data link | MODBUS Serial Line Protocol |
1 | Physical | EIA/TIA-485 (or EIA/TIA-232) |
MODBUS Data Link Layer
- Each Slave must have a unique address (1…247)
- Address 0 is reserved for broadcast messages from Master -> Slave (all Slaves)
Modbus RTU-Frame
Byte 0: Slave Address
Byte 1: Funktion Code
Byte 2-254: Data
Byte 2-254: CRC Low Byte
Byte 3-255: CRC High Byte
- The maximum size of one Modbus-RTU frame is 256 byte.
- Two frames are seperated by a silent intervall of at least 3,5 characters.
Transmission
Transmission of one bit:
8–bit binary
1 start bit
8 data bits, least significant bit sent first
1 bit for parity completion
1 stop bit
Serial settings
Baudrate: 9600 (Standard) others optional
Parity: Even (None should also be implementes – others optional)
Stopbit: 1 (if none parity 2)