Naar de inhoud
Elausys

Modbus TCP Gateways voor Alarmsystemen / AJAX-MBTCP Handleiding

Modbus TCP-protocol

Ondersteunde functiecodes, uitzonderingsreacties en de Modbus TCP-berichtenheader.

elausys · 15 september 2026
Op deze pagina

Supported Function Codes

The gateway supports the following Modbus function codes:

CodeNameDescription
0x01Read CoilsRead coil status (status registers)
0x05Write Single CoilWrite a single coil (command registers)

Exception Codes

The gateway returns the following Modbus exception codes when an error occurs:

CodeNameDescription
0x01Illegal FunctionFunction code not supported
0x02Illegal Data AddressCoil address out of range
0x03Illegal Data ValueInvalid value (neither 0xFF00 nor 0x0000)

MBAP Header

All Modbus TCP communication uses the standard MBAP (Modbus Application Protocol) header:

ByteFieldValue
0–1Transaction IDSet by client (echoed in response)
2–3Protocol ID0x0000 (Modbus)
4–5LengthNumber of following bytes
6Unit ID0x01
7Function Code0x01, 0x05
8+DataFunction-specific payload

Veelgestelde vragen

Welke Modbus-functiecodes worden ondersteund?

Gebruik 0x01, Read Coils, en 0x05, Write Single Coil. De gateway biedt coils en geen holding registers.

Welke waarden zijn geldig voor Write Single Coil?

De gedocumenteerde waarden zijn 0xFF00 voor ON en 0x0000 voor OFF. Andere waarden geven uitzondering 0x03, Illegal Data Value.

Welke Unit ID hoort in de MBAP-header?

Stel de Unit ID in op 0x01, de decimale waarde 1.

Verder verkennen

Vind de andere handleidingen voor dit product in de documentatie.

Terug naar AJAX-MBTCP Handleiding