Documentation
FieldTalk Modbus Master Library for .NET
MbusMasterFunctionswriteCoil Method |
Modbus function 5 (05 hex), Force Single Coil/Write Coil.
Namespace: FieldTalk.Modbus.Master
Assembly: FieldTalk.Modbus.Master (in FieldTalk.Modbus.Master.dll) Version: 2.15.2-eval+3d8362b4bb861c05760d48b11d303e954bb8597c
Parameters
- slaveAddr
- Type: SystemInt32
Modbus address of slave device or unit identifier (Range: 0 - 255) - bitAddr
- Type: SystemInt32
Coil address (Range: 1 - 65536) - bitVal
- Type: SystemBoolean
true sets, false clears discrete output variable
Return Value
Type: Int32BusProtocolErrors.FTALK_SUCCESS on success or error code. See BusProtocolErrors for possible error codes.
Sets a single discrete output variable (coil, 0:00000 table) to either ON or OFF.
| Broadcast supported for serial protocols |