FieldTalk™ Modbus Master .NET Library

MbusMasterFunctions.writeMultipleLongInts Method (Int32, Int32, Int32[])

Modbus function 16 (10 hex) for 32-bit long int data types, Preset Multiple Registers/Write Multiple Registers with long int data.

[Visual Basic]
Overloads Public Function writeMultipleLongInts( _
   ByVal slaveAddr As Integer, _
   ByVal startRef As Integer, _
   ByVal int32Arr As Integer() _
) As Integer
[C#]
public int writeMultipleLongInts(
   int slaveAddr,
   int startRef,
   int[] int32Arr
);

Parameters

slaveAddr
Modbus address of slave device or unit identifier (Range: 0 - 255)
startRef
Start reference (Range: 1 - $10000)
int32Arr
Buffer with the data to be sent. The length of the array determines how many values are read (Range: 1-50).

Return Value

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

Remarks

Writes long int values into pairs of output registers (holding registers, 4:00000 table).

Note    Modbus does not know about any other data type than discretes and 16-bit registers. Because a long int value is of 32-bit length, it will be transferred as two consecutive 16-bit registers. This means that the amount of registers transferred with this function is twice the amount of int values passed to this function.
Note    Broadcast supported for serial protocols

See Also

MbusMasterFunctions Class | FieldTalk Namespace | MbusMasterFunctions.writeMultipleLongInts Overload List