[Ethercat Device]
描述
卸載該從站物件。
語法
int detach();
參數
無
回傳值
Return an error code. If the returned value is zero, it indicates a successful execution of this function.
備註
This function must be called after a successful execution of EthercatDevice_Generic::attach()
.
WARNING: Prohibited from being called within the callback functions.
範例
#include "Ethercat.h" EthercatMaster master; EthercatDevice_Generic slave; void setup() { master.begin(); slave.attach(0, master); delay(3000); slave.detach(); master.end(); } void loop() { // do something here. }
Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.