[EthercatDevice_DmpStepper_Generic]
説明
Configure the device mode for the EtherCAT slave device. This parameter is written to the EEPROM of the EtherCAT slave device and loaded during startup, so users do not need to configure this parameter each time before running the program. After calling this function, the device mode of the EtherCAT slave device will not change immediately. The EtherCAT slave device must be repowered for the change to take effect.
This EtherCAT slave device supports the following two device modes:
- CiA 402 Servo
This EtherCAT slave device is equipped with 3-axis CiA 402 stepper motors. Users can individually control each CiA 402 stepper motor. - G-code Controller
This EtherCAT slave device functions as a G-code controller, responsible for parsing and executing G-code instructions.
派生クラス:
クラス名 | 製造者ID | 製品コード |
EthercatDevice_QECR11MP3S | 0x00000bc3 | 0x0086d0d6 |
EthercatDevice_QECR00MP3S | 0x00000bc3 | 0x0086d0d9 |
構文
int configDeviceMode(uint8_t mode);
媒介変数
[in] uint8_t mode
The device modes supported by this EtherCAT slave device are as follows:
定義 | Value | 説明 |
ECAT_CIA402_SERVO_MODE | 0 | CiA 402 Servo mode. |
ECAT_GCODE_CONTROLLER_MODE | 1 | G-code Controller mode. |
戻り値
error codeを返します。返された値が 0の場合、この関数が正常に完了したことを示します。
備考
この関数は、 EthercatMaster::begin()
が正常に実行された後で呼び出す必要があります。この関数はブロッキングされているため、循環コールバック関数内で呼び出すことができません。
例
#include "Ethercat.h" EthercatMaster master; EthercatDevice_QECR11MP3S slave; void setup() { master.begin(); slave.attach(0, master); slave.configDeviceMode(ECAT_GCODE_CONTROLLER_MODE); } void loop() { // ... }
Please see EthercatDevice_DmpStepper_Generic Class for more QEC Stepper Drivers instructions and API usage.