Back to Adaptive Vision Library website

You are here: Start » Function Reference » Modbus TCP » ModbusTCP_SendBytes_Deprecated

ModbusTCP_SendBytes_Deprecated


Sends data using Modbus TCP frame format

Syntax

void avl::ModbusTCP_SendBytes_Deprecated
(
	const atl::SocketId& inSocket,
	const atl::Optional<int>& inTimeout,
	int inUnitID,
	int inFunctionCode,
	const atl::Array<int>& inBytes,
	atl::Array<int>& outResponse
)

Parameters

Name Type Range Default Description
inSocket const SocketId& Connected socket ID on port 502.
inTimeout const Optional<int>& 100 - NIL Timeout in milliseconds, block if not specified.
inUnitID int 0 - 255 1 Default is 1
inFunctionCode int 0 - 255 1 Function code
inBytes const Array<int>& Values to send, each in range ( 0..255 )
outResponse Array<int>& Response

Errors

Error type Description
DomainError Sending value is not in range <0; 255>.