Back to Adaptive Vision Library website
You are here: Start » Function Reference » Modbus TCP » ModbusTCP_ForceMultipleCoils
Function Code 15. Force each coil in a sequence of coils to either ON or OFF in a remote device
Syntax
void avl::ModbusTCP_ForceMultipleCoils ( const avl::SocketId& inSocket, const atl::Optional<int>& inTimeout, int inUnitID, int inStartingAddress, const atl::Array<bool>& inStatuses )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inSocket | const SocketId& | Connected socket ID on port 502. | |||
inTimeout | const Optional<int>& | 10 - | NIL | Timeout in milliseconds, block if not specified. | |
inUnitID | int | 0 - 255 | 1 | Default is 1. | |
inStartingAddress | int | 0 - 65535 | The address of the first coil. | ||
inStatuses | const Array<bool>& |
Errors
Error type | Description |
---|---|
DomainError | Size of statuses array should be between 1 and 1968. |
See Also
- ModbusTCP_ReadCoils – Function Code 01. Read contiguous status of coils in a remote device
- ModbusTCP_WriteCoil – Function Code 05. Write a single output to either ON or OFF in a remote device