FieldTalk™ Modbus Master .NET Library

MbusMasterFunctions.readMultipleRegisters Method (Int32, Int32, Int16[])

Modbus function 3 (03 hex), Read Holding Registers/Read Multiple Registers.

[Visual Basic]
Overloads Public Function readMultipleRegisters( _
   ByVal slaveAddr As Integer, _
   ByVal startRef As Integer, _
   ByVal regArr As Short() _
) As Integer
[C#]
public int readMultipleRegisters(
   int slaveAddr,
   int startRef,
   short[] regArr
);

Parameters

slaveAddr
Modbus address of slave device or unit identifier (Range: 1 - 255)
startRef
Start register (Range: 1 - $10000)
regArr
Buffer which will be filled with the data read. The length of the array determines how many registers are read (Range: 1-125).

Return Value

BusProtocolErrors.FTALK_SUCCESS on success or error code. See BusProtocolErrors for possible error codes.

Remarks

Reads the contents of the output registers (holding registers, 4:00000 table).

Note    No broadcast supported

See Also

MbusMasterFunctions Class | FieldTalk Namespace | MbusMasterFunctions.readMultipleRegisters Overload List