Main Content

Modbus Communication

Communicate with Modbus servers to access controllers, probes, and other instruments

Industrial Communication Toolbox™ supports the Modbus interface over TCP/IP or Serial RTU. You can use it to communicate with Modbus servers, such as controlling a PLC, communicating with a temperature controller, controlling a stepper motor, sending data to a DSP, reading bulk memory from a PAC controller, or monitoring temperature and humidity on a Modbus probe.

Create the interface object using themodbusfunction, and use theread,write,writeRead, andmaskWritefunctions for communication.

For an example that shows the entire workflow of reading a register from a PLC, seeRead Temperature from a Remote Temperature Sensor.

You can also read and write to coils and registers using the Modbus Explorer, which offers a graphical user interface to easily set up reads and writes, and a live plot to see the values. For information, seeUse the Modbus Explorer App. For an example that shows the entire workflow of reading and writing to a PLC using the app, seeControl a PLC Using the Modbus Explorer.

Functions

modbus Create Modbus object
read Read data from a Modbus server
write Perform a write operation to the connected Modbus server
writeRead Perform a write then read operation on groups of holding registers in a single Modbus transaction
maskWrite Perform mask write operation on a holding register

Apps

Modbus Explorer Read and write to Modbus coils and registers

Topics

Modbus Communication Using Programmatic Workflow

Modbus Communication Using the Modbus Explorer

Troubleshooting

Troubleshooting the Modbus Interface

Try these tips if you have problems using the toolbox Modbus interface. See information about Modbus supported platforms, configuration and connection, and other interface-specific tips.