[Modbus]
説明
Initialize the ModbusGateway object and specify the communication mode between this object and the Modbus Master.
構文
gateway1.begin(mode, serial)
gateway2.begin(mode)
媒介変数
gateway1/gateway2
: ModbusGateway object.mode
: Specify the communication mode between the ModbusGateway object and the Modbus Master with MODBUS_RTU, MODBUS_ASCII or MODBUS_TCP quotes.serial
: Specify the Serial class as the transmission channel.
戻り値
bool: Returns true if successful, false if not
例
#include <Modbus86.h> #include <Ethernet.h> ModbusGateway gateway1; ModbusGateway gateway2; void setup() { Serial485.begin(115200); gateway1.begin(MODBUS_RTU, Serial485); Ethernet.begin(); gateway2.begin(MODBUS_TCP); } void loop() { }
Libraries Reference Home
86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。