Delta EtherCAT Programming Manual page 40

Table of Contents

Advertisement

EtherCAT Programming Guide
Motion status:
RetCode = _ECAT_Slave_Motion_Get_StatusWord(gESCCardNo, gNodeID, gSlotID,
&Status);
// Get the current status (IO Sts. field).
RetCode = _ECAT_Slave_Motion_Get_Mdone(gESCCardNo, gNodeID, gSlotID,
&MCDone);
// Get the current status of the motor (Motion field).
(8) Reset the feedback value and clear the alarm
Press the RESET key (as shown in figure 3.5.2.4) to execute the following program:
RetCode = _ECAT_Slave_Motion_Set_Position(gESCCardNo, gNodeID, gSlotID, 0);
// Clear feedback first (Value showed in servo drive panel will be set to 0).
RetCode = _ECAT_Slave_Motion_Set_Command(gESCCardNo, gNodeID, gSlotID, 0);
// Then, clear the command.
Press the RALM key (as shown in figure 3.5.2.4) to execute the alarm clearing command:
RetCode = _ECAT_Slave_Motion_Ralm(gESCCardNo, gNodeID, gSlotID);
// Clear the alarm of slave station
(9) Exit program
Press the Exit key to exit and close the program.
Execute "_ECAT_Master_Reset" and "_ECAT_Master_Close" to exit the function. Detailed
description about these two API is presented in section 3.1.2 Exit program.
March, 2017
EtherCAT Operation Example
3
3-19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents