[Ethercat Device]
説明
EtherCATスレーブデバイスでサポートされているServo Drive Profile over EtherCAT(SoE) の数を取得します。
構文
int getSoEChannels();
戻り値
EtherCATスレーブデバイスでサポートされているSoEのチャンネル数を戻します。戻り値が0未満の場合、 error codeを示します。.
備考
この関数は、 EthercatMaster::begin()
が正常に実行された後に呼び出す必要があります。この関数はブロッキングされていないため、循環コールバック内で呼び出すことができます。
例
#include "Ethercat.h" EthercatMaster master; EthercatDevice_Generic slave; void setup() { Serial.begin(115200); master.begin(); slave.attach(0, master); Serial.println(slave.getSoEChannels()); } void loop() { // put your main code here, to run repeatedly: }
詳細は EtherCAT Library User Manual QEC EtherCAT命令とAPI使用法参照