Set Unit ID VI
- Updated2024-11-20
- 3 minute(s) read
Sets the identification of a serial Modbus slave. When you wire a Modbus master instance to the Modbus master in input and specify a value for the unit ID input, this Modbus master instance can communicate with the Modbus slave with the specified unit ID. This VI ignores requests from TCP Modbus master instances.
You can also use the Property Node to set the identification of a Modbus slave.

Inputs/Outputs
Modbus master in
—
Modbus master in specifies the reference to the Modbus master instance. Use the Create Master Instance VI to create a Modbus master instance.
unit ID
—
unit ID specifies the identification of the Modbus slave.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Modbus master out
—
Modbus master out returns a duplicate of Modbus master in.
error out
—
error out contains error information. This output provides standard error out functionality. |
Set Unit ID Details
You can use the Set Unit ID VI to simultaneously access different Modbus slaves through a single serial Modbus master instance, as shown in the following block diagram:

The following list describes important details about the previous diagram:
![]() | The serial master instance 1 output can access the Modbus slave with a unit ID of 1. |
![]() | The serial master instance 2 output can access the Modbus slave with a unit ID of 2. |
Modbus master in
—
unit ID
—
error in (no error)
—
Modbus master out
—
error out
—

