writeRead
Perform write and read operation on groups of holding registers in single Modbus transaction
Syntax
Description
writes data to Modbus object moddata
= writeRead(m,writeAddress
,values
,readAddress
,readCount
)m
at the starting address
writeAddress
using the values to write values
,
and then reads data at the starting address readAddress
using the
number of values to read readCount
.
This function performs a combination of one write operation and one read operation on groups of holding registers in a single Modbus transaction. The write operation is always performed before the read. The range of addresses to read must be contiguous, and the range of addresses to write must be contiguous, but write and read addresses are specified independently and need not overlap.
adds optional precisions for the write and read operations. The
moddata
= writeRead(m,writeAddress
,values
,writePrecision
,readAddress
,readCount
,readPrecision
)writePrecision
and readPrecision
arguments
specify the data format of the register being written to and read from on the Modbus
server.