Introduction to the Slave VIs

Modbus LabVIEW VI

Introduction to the Slave VIs

You can use the MODBUS Library VIs as masters or slaves. When used as a master, the machine that the VIs are running on sends commands or queries to the slave(s). The master reads/writes the slave's coils/discrete inputs/registers. As a slave, the machine must store this data somewhere. The slave VIs make use of arrays to store and access this data. The first VI you must use is MB Slave Init (poly).vi, which initializes two 65536 U16 arrays (for registers) and two 65536 Boolean arrays (for coils and discrete inputs). All other slave VIs access this memory location in different ways.

The following table describes the primary table object types and read/write types.

Primary Tables Object Type Type
Discrete inputs Single bit Read only
Coils Single bit Read/write
Input registers 16-bit word Read only
Holding registers 16-bit word Read/write