attach()
Description
Initialize the ModbusMasterNode object and specify the mounting channel and the corresponding node number.
Syntax
node1.attach(slave_id, bus1) node2.attach(bus2)
Parameters
node1/node2: ModbusMasterNode object.
slave_id: Specifies the corresponding Slave node number. In TCP mode, if the number is not specified, the number will be preset to MODBUS_TCP_SLAVE (0xFF).
bus1/bus2: Specifies the ModbusMaster object to be mounted.
Return
bool: If successful, return true, otherwise return false
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 |
|
See Also
- ModbusMaster::begin()
- ModbusSlaveNode::attach()
Library Reference
The text in the 86Duino reference is modified from the Arduino reference and is licensed under the Creative Commons Attribution-Share Alike 3.0 License . The code examples in the reference have been released into the public domain.
