<< modbus_setSlave modbus modbus_tcpListen >>

modbus >> modbus > modbus_setTimeout

modbus_setTimeout

set timeout for response

Calling Sequence

modbus_setTimeout(mbc, timeout)

Arguments

mbc

The Modbus connection created with modbus_newTcp or modbus_newRtu.

timeout

The timeout value in ms.

Description

Set the timeout interval used to wait for a response. If the waiting before receiving the response is longer than the given timeout, an error will be raised.

Examples

mbc = modbus_newTcp("127.0.0.1", 502)
modbus_setTimeout(mbc, 1200)
modbus_getTimeout(mbc)
modbus_free(mbc)

See Also


Report an issue
<< modbus_setSlave modbus modbus_tcpListen >>