FieldTalk™ Modbus Master .NET Library

MbusMasterFunctions.forceMultipleCoils Method (Int32, Int32, Boolean[])

Modbus function 15 (0F hex), Force Multiple Coils.

[Visual Basic]
Overloads Public Function forceMultipleCoils( _
   ByVal slaveAddr As Integer, _
   ByVal startRef As Integer, _
   ByVal bitArr As Boolean() _
) As Integer
[C#]
public int forceMultipleCoils(
   int slaveAddr,
   int startRef,
   bool[] bitArr
);

Parameters

slaveAddr
Modbus address of slave device or unit identifier (Range: 1 - 255)
startRef
Start reference (Range: 1 - $10000)
bitArr
Buffer which contains the data to be sent. The length of the array determines how many coils are written (Range: 1-800).

Return Value

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

Remarks

Writes binary values into a sequence of discrete outputs (coils, 0:00000 table).

Note    Broadcast supported for serial protocols

See Also

MbusMasterFunctions Class | FieldTalk Namespace | MbusMasterFunctions.forceMultipleCoils Overload List