EthercatDevice_QECRXXHU.attach()

[EthercatDevice_QECRXXHU]

説明

Specify the EC-Slave number and mount it on the EC-Master.

Class Modules

class EthercatDevice_QECR11HU5S;
/* MPG + Keypad + LCM + RS232x2, RJ45 power [1, 1] */
class EthercatDevice_QECR00HU5S;
/* MPG + Keypad + LCM + RS232x2, RJ45 power [0, 0] */
class EthercatDevice_QECR11HU9S;
/* MPG + Keypad + LCM + RS232/485x2, RJ45 power [1, 1] */
class EthercatDevice_QECR00HU9S;
/* MPG + Keypad + LCM + RS232/485x2, RJ45 power [0, 0] */

Format

  • int attach(uint16_t slave_id, EthercatMaster *master, EthercatAttachMode mode = ECAT_SLAVE_NO);
  • int attach(uint16_t slave_id, EthercatMaster &master, EthercatAttachMode mode = ECAT_SLAVE_NO);

Syntax

EthercatDevice_QECRXXHU slave;
slave.attach(0, master);

Parameters

  • uint16_t slave_id
    • ECAT_SLAVE_NO: EtherCAT Slave Number.
    • ECAT _ALIAS_ADDRESS: EtherCAT Slave Alias Address.
  • EthercatMaster *master / &master
  • EthercatAttachMode mode
    • ECAT_SLAVE_NO
    • ECAT_ALIAS_ADDRESS

Returns

Int: 0 for successful; if the return value is smaller than 0 means an error.

Example

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_QECR00HU9S slave;

void setup(void) {
    master.begin();
    slave.attach(0, master);
    master.start();
}

void loop() {}

Libraries Reference Home

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

コメントする

上部へスクロール