Overview
This example runs a Modbus master protocol stack over TCP.
Behavior
The device communicates with Slave 1 (see modbus_slave example):
- Master writes DIP switch values to coils 0-7.
- Master writes the logical OR of DIP switch values to coil 8.
- Master reads input registers 0-1 and displays the result as text.
- Master writes holding register 0 with digital input values.
- Master reads discrete inputs 0-7 and applies them to digital outputs.
- Master reads discrete inputs 8-11 and uses them to control display LEDs.
Setup
The board is assigned static IP address 192.168.1.222.