説明
Deinitialize the object of this EtherCAT SubDevice class and detach it from the object of EthercatMaster class.
構文
int detach();
Parameters None.
戻り値
error codeを返します。返された値が 0の場合、この関数が正常に完了したことを示します。
備考
この関数は、 attach().
- WARNING: Prohibited from being called in the callback functions.
例
#include "Ethercat.h"
EthercatMaster master;
EthercatDevice_CiA402 motor;
void setup()
{ master.begin();
motor.attach(0, master);
delay(1000);
motor.detach();
}
void loop() {
// put your main code here, to run repeatedly:
}詳細は EtherCAT CiA 402 User Manual QEC EtherCAT命令とAPI使用法参照