FieldTalk™ Modbus Master .NET Library

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

Modbus function 4 (04 hex), Read Input Registers.

[Visual Basic]
Overloads Public Function readInputRegisters( _
   ByVal slaveAddr As Integer, _
   ByVal startRef As Integer, _
   ByVal regArr As Short() _
) As Integer
[C#]
public int readInputRegisters(
   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

Read the contents of the input registers (3:00000 table).

Note    No broadcast supported

See Also

MbusMasterFunctions Class | FieldTalk Namespace | MbusMasterFunctions.readInputRegisters Overload List