writeSingleRegister()
Description
Sends a packet command to the Slave node to write to a single Holding Register register.
Syntax
node1.writeSingleRegister(write_address, write_size)
Parameters
node1
: ModbusMasterNode
object.
write_address
: The address of the Holding Register register to be written.
write_size
: The size of the Holding Register register to be written.
Return
int
: If successful, return MODBUS_SUCCESS
, otherwise return EXCEPTION_CODE .
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
See Also
Library Reference
The text in the 86Duino reference is modified from the Arduino reference and is licensed under the Creative Commons Attribution-ShareAlike 3.0 License The code examples in Resources have been released into the public domain.