Modbus Library

86Diuno IDE includes this library from Coding version 318 to support the Modbus communication protocol, an industrial communication standard published in 1979 for communication between automated electronic devices such as Programmable logic controllers (PLCs).

Modbus is a master/slave based protocol where a master node communicates with multiple slave nodes on the network. Each node has a unique address. When the master node sends a packet to the specified address, only the slave node at the corresponding address receives and parses the packet and executes and responds to commands based on the packet contents.

86Duino’s Modbus library has the following features:

  • It supports Modbus RTU, TCP, and ASCII sub-protocols.
  • Runs as both Modbus master and Modbus slave nodes.
  • Support Modbus gateway function

Modbus Master

The Modbus Master enables the 86Duino to emulate a Modbus Master and send packets to the Slave node on the channel.

ModbusMaster Class

Use Serial / Ethernet for Modbus transfer.

ModbusMasterNode Class

Send the corresponding node packet command.

Modbus Slave

Modbus Slave enables the 86Duino to emulate a Modbus Slave node, receive commands and execute callback functions on the channel.

ModbusSlave Class

Use Serial / Ethernet for Modbus transfer.

ModbusSlaveNode Class

Receives and parses the corresponding packets and accesses the data registers and callback functions as instructed.

The callback function with array of indicators.

Direct access to the Slave register function, is usually used in the callback function.

Modbus Gateway

The Modbus Gateway enables the 86Duino to emulate the Modbus Gateway, a gateway for forwarding Modbus Master communication data.

ModbusGateway Class

A gateway that forwards Modbus Master communication data.

Demo Video

Libraries Reference Home

The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top