Back to Aurora Vision Library Lite website

You are here: Start » System » Modbus TCP » ModbusTCP_WriteSingleRegister

ModbusTCP_WriteSingleRegister


Header: STD.h
Namespace: avl

Function Code 06. Writes a single holding register in a remote device

Syntax

void avl::ModbusTCP_WriteSingleRegister
(
	const avl::SocketId& inSocket,
	const atl::Optional<int>& inTimeout,
	int inUnitID,
	int inRegisterAddress,
	int inValue
)

Parameters

Name Type Range Default Description
Input value inSocket const SocketId& Connected socket ID on port 502.
Input value inTimeout const Optional<int>& 10 - NIL Timeout in milliseconds, block if not specified.
Input value inUnitID int 0 - 255 1 Default is 1.
Input value inRegisterAddress int 0 - 65535 The address of the holding register to be written.
Input value inValue int 0 - 65535 Value to send.

See Also