[EtherCAT Device CiA402]
説明
Disable the touch probe 1.
Relevant Objects
- Object 60B8h: Touch probe function
- Object 60B9h: Touch probe status
構文
int disableTouchProbe1();
媒介変数
なし
戻り値
error codeを返します。返された値が 0の場合、この関数が正常に完了したことを示します。
備考
この関数は、 . This function is blocking and cannot be called in callback functions.
例
#include "Ethercat.h"
EthercatMaster master;
EthercatDevice_CiA402 motor;
void setup() {
Serial.begin(115200);
while (!Serial);
master.begin();
motor.attach(0, master);
motor.enableTouchProbe1(CIA402_TPMODE_FIRST_EVENT, CIA402_TPSRC_TP_INPUT, CIA402_TPTIMING_POS_EDGE);
while (motor.isTouchProbe1ValueReady(CIA402_TPVALUE_POS_EDGE) == false);
Serial.print("Touch probe position 1 positive value: ");
Serial.println(motor.readTouchProbe1Value(CIA402_TPVALUE_POS_EDGE));
motor.disableTouchProbe1();
}
void loop() {
// put your main code here, to run repeatedly:
}
詳細は EtherCAT CiA 402 ユーザーマニュアル QEC EtherCAT命令とAPI使用法参照