サイト内検索

検索

コードライブラリ

目次

motor.detach()

[EtherCAT Device CiA402]

説明

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

構文

int detach();

媒介変数

なし

戻り値

error codeを返します。返された値が 0の場合、この関数が正常に完了したことを示します。

備考

この関数は、 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: 
 
}

詳細は EtherCAT CiA 402 ユーザーマニュアル QEC EtherCAT命令とAPI使用法参照

上部へスクロール