Write and Read Multiple Holding Registers VI
- Updated2024-11-20
- 3 minute(s) read
Writes and reads values to and from contiguous holding registers.

Inputs/Outputs
![]() Modbus slave in specifies the reference to the Modbus slave instance. Use the Create Slave Instance VI to create a Modbus slave instance. ![]() write operation starting address specifies the initial address for the write operation. Valid values are between 0 and 65,535, where 65,535 is the maximum number. The address that this VI writes is 0-based, meaning that the address numbering convention for the Modbus slave starts at 0. ![]() values to write specifies the holding register values you want to write. values to write is an array. Valid sizes of this array are between 1 and 65,536, where 65,536 is the maximum number. After you specify a value for values to write, check the value you specify for write operation starting address. Ensure that you do not make this VI write the value of a holding register whose address is larger than 65,535. Otherwise, LabVIEW returns error code -389113. ![]() error in describes error conditions that occur before this node runs. This input provides standard error in functionality. ![]() read operation starting address specifies the initial address for the read operation. Valid values are between 0 and 65,535, where 65,535 is the maximum number. The address that this VI reads is 0-based, meaning that the address numbering convention for the Modbus slave starts at 0. ![]() read count specifies the number of holding registers to read. Valid values are between 1 and 65,536, where 65,536 is the maximum number. After you specify a value for read count, check the value you specify for read operation starting address. Ensure that you do not use this VI to read the value of a holding register whose address is larger than 65,535. Otherwise, LabVIEW returns error code -389113. ![]() Modbus slave out returns a duplicate of Modbus slave in. ![]() values read returns the holding register values. ![]() error out contains error information. This output provides standard error out functionality. |