ModbusSlaveNode.poll()

[Modbus]

説明

Receives and parses Modbus packets and accesses the register and callback function according to the command.

When the function code is Read command, it will call the callback function first and then read the register back; when the function code is Write command, it will write the register first and then call the callback function; when the function code is ReadWrite command, it will write the register first and then call the Write callback function, then call the Read callback function and finally read the register back.

Syntax

node1.poll()
node2.poll(buf, size)

Parameters

  • node1/node2: ModbusSlaveNode object.
  • buf: User-defined registry space.
  • size: The size of the self-defined space.

Returns

Int: The length of the received Modbus packets.

Example

Please refer to the Modbus Slave example.

See Also


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール