[EthercatDevice_DmpStepper_Generic]
描述
Get the device mode for the EtherCAT slave device.
衍生類別:
| Class Name | Vendor ID | Product Code |
| EthercatDevice_QECR11MP3S | 0x00000bc3 | 0x0086d0d6 |
| EthercatDevice_QECR00MP3S | 0x00000bc3 | 0x0086d0d9 |
語法
int getDeviceMode();
參數
無
回傳值
Return the device mode. If the return value is less than 0, it indicates an 錯誤代碼. For details about device modes, please refer to configDeviceMode().
備註
This function must be called after a successful execution of EthercatMaster::begin(). This function is blocking and cannot be called within the callback functions.
範例
#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 類別 for more QEC Stepper Drivers instructions and API usage.