サイト内検索

検索

Shares

Table of Content

EthercatDevice_DmpStepper.getDeviceMode()

[EthercatDevice_DmpStepper_Generic]

説明

Get the device mode for the EtherCAT slave device.

派生クラス:

クラス名製造者ID製品コード
EthercatDevice_QECR11MP3S0x00000bc30x0086d0d6
EthercatDevice_QECR00MP3S0x00000bc30x0086d0d9

構文

int getDeviceMode();

媒介変数

なし

戻り値

Return the device mode. If the return value is less than 0, it indicates an error codeを示します。. For details about device modes, please refer to configDeviceMode().

備考

この関数は、 EthercatMaster::begin()が正常に実行された後に呼び出す必要があります。 この関数はブロッキングされており、コールバック関数内で呼び出すことはできません。

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_QECR11MP3S slave;

void setup() {
  Serial.begin(115200);
  master.begin();
  slave.attach(0, master);
  
  Serial.print("Device Mode: ");
  Serial.println(slave.getDeviceMode());
}

void loop() {
  // ...
}

Please see EthercatDevice_DmpStepper_Generic Class for more QEC Stepper Drivers instructions and API usage.

上部へスクロール