[EthercatDevice_DmpStepper_Generic]
Description
Get the device mode for the EtherCAT slave device.
Derived Class:
| Class Name | Vendor ID | Product Code |
| EthercatDevice_QECR11MP3S | 0x00000bc3 | 0x0086d0d6 |
| EthercatDevice_QECR00MP3S | 0x00000bc3 | 0x0086d0d9 |
Syntax
int getDeviceMode();
Parameters
None.
Return Value
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().
Comment
This function must be called after a successful execution of EthercatMaster::begin(). This function is blocking and cannot be called within the callback functions.
Example
#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.