getResponseBuffer()
Description
Read the value of the private array readData in the ModbusMasterNode class. readData is the array stored after reading back the Slave device register using the Read function code.
Syntax
node1.getResponseBuffer(index, mode)
Parameters
node1: ModbusMasterNode object.
index: Index value of the readData array.
mode: The mode of reading data from the readData array. Its argument is MODBUS_DATAMODE_BIT or MODBUS_DATAMODE_UINT16. If no argument is given, it will be preset to MODBUS_DATAMODE_UINT16.
Return
int: The value taken from the readData array. If an error occurs, 0xFFFF will be returned.
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 27 28 29 30 31 |
|
See Also
– clearResponseBuffer()
– readCoils()
– readDiscreteInputs()
– readHoldingRegisters()
– readInputRegisters()
– readWriteMultipleRegisters()
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 the reference have been released into the public domain.
