我想找...

搜尋

函式庫參考

目錄

motor.detach()

[EtherCAT Device CiA402]

描述

Deinitialize the object of this EtherCAT SubDevice class and detach it from the object of EthercatMaster class.

語法

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_CiA402::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: 
 
}

Please see the EtherCAT CiA 402 使用手冊 for more QEC EtherCAT instructions and API usage.

返回頂端