Delta EtherCAT Programming Manual page 32

Table of Contents

Advertisement

EtherCAT Programming Guide
Press the STOP key (as shown in figure 3.3.2.4) to execute the following program:
RetCode = _ECAT_Slave_Motion_Emg_Stop(gESCCardNo, gNodeID, gSlotID);
/* Stop torque control of the motor. */
(6) Status display
Command values of the motion:
RetCode = _ECAT_Slave_Motion_Get_Command(gESCCardNo, gNodeID, gSlotID,
&Cmd);
// Get the command value (CMD. field).
RetCode = _ECAT_Slave_Motion_Get_Position(gESCCardNo, gNodeID, gSlotID, &Pos);
// Get the feedback value of the command (FBK. field).
Motion status:
RetCode = _ECAT_Slave_Motion_Get_StatusWord(gESCCardNo, gNodeID, gSlotID,
&Status);
// Get the current motion status (IO Sts. field).
RetCode = _ECAT_Slave_Motion_Get_Mdone(gESCCardNo, gNodeID, gSlotID,
&MCDone);
// Get the current status of the motor (Motion field).
(7) Reset feedback and clear alarm
Press the RESET key (as shown in figure 3.3.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.3.2.4) to execute the alarm clearing command:
RetCode = _ECAT_Slave_Motion_Ralm(gESCCardNo, gNodeID, gSlotID);
// Clear the alarm of slave station.
(8) 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
Figure 3.3.2.5
EtherCAT Operation Example
3
3-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents