FieldTalk™ Modbus Master .NET Library

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

Modbus function 16 (10 hex), Preset Multiple Registers/Write Multiple Registers.

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

Parameters

slaveAddr
Modbus address of slave device or unit identifier (Range: 0 - 255)
startRef
Start register (Range: 1 - $10000)
regArr
Buffer with the data to be sent. The length of the array determines how many registers are written (Range: 1-100).

Return Value

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

Remarks

Writes values into a sequence of output registers (holding registers, 4:00000 table).

Note    Broadcast supported for serial protocols

See Also

MbusMasterFunctions Class | FieldTalk Namespace | MbusMasterFunctions.writeMultipleRegisters Overload List