Introduction to Modbus Masters and Slaves (DSC Module or Real-Time Module)

LabVIEW 2017 Real-Time Module Help

Edition Date: March 2017

Part Number: 370622R-01

»View Product Info
Download Help (Windows Only)

In Modbus master-slave communication, the Modbus master initiates transactions or queries, whereas the Modbus slaves respond by providing the requested data or performing the requested action. Typical Modbus master devices include host processors and programming panels. Typical Modbus slave devices include programmable controllers. The messages that Modbus masters and slaves exchange are called frames. Different Modbus communications methods, such as Modbus Serial and Modbus Ethernet, lead to different types of Modbus master-slave communication.

Master-Slave Communication in Modbus Serial

In this communications method, a Modbus master and one or more Modbus slaves connect to the same bus simultaneously. The maximum number of Modbus slaves that a serial bus can connect to is 247. The Modbus master initiates communication with Modbus slaves using one of the following modes:

  • Unicast mode—In this mode, a Modbus master communicates with a single Modbus slave. The Modbus master sends a request to the Modbus slave; this Modbus slave receives and processes the request and returns a message to the Modbus master. A Modbus transaction consists of two messages: a request from the Modbus master and a reply from the Modbus slave.
    Note Note   Each Modbus slave must have a unique address, also known as unit ID, so that other Modbus slaves can communicate with this Modbus slave independently.
  • Broadcast mode—In this mode, a Modbus master can send a request to all Modbus slaves simultaneously. Modbus slaves return no response to the broadcast requests that the Modbus master sends. Modbus slaves do not communicate directly with each other.

Master-Slave Communication in Modbus Ethernet

In this communications method, one or more Modbus masters establish a TCP connection to communicate with a Modbus slave. The Modbus masters connect to the Modbus slave with a specific address and port. The Modbus slave determines the number of Modbus masters that can connect to itself.

 Understanding Modbus Communication in LabVIEW

WAS THIS ARTICLE HELPFUL?

Not Helpful