Delta EtherCAT Programming Manual page 45

Table of Contents

Advertisement

EtherCAT Operation Example
Press the SVON key (as shown in figure 3.6.2.4) to execute the following program:
RetCode = _ECAT_Slave_Motion_Set_Svon(gESCCardNo, gNodeID[i], gSlotID[i],
ON_OFF);
3
// ON_OFF:
// 0: Servo OFF
//1: Servo ON
(6) Select P To P and start the point to point motion control
Press the ← or → key (as shown in figure 3.6.2.4) to execute the following program:
RetCode = _ECAT_Slave_CSP_Start_Move(gESCCardNo, gNodeID[0], gSlotID[0],
Dist[0], StrVel, ConstVel, EndVel, Tacc, Tdec, gbIsSCurve, gbIsABS);
// gblsSCurve
// 1: T-Curve
// 2: S-Curve
// gblsABS
// 0: Relative movement
// 1: Absolute movement
(7) Change the position or speed in P To P mode
Press the ← or → key (as shown in figure 3.6.2.4) to select P To P motion control. To
replace the current position with a new position, press the Change key in Position Change
section (as shown in figure 3.6.2.5) to execute the following program:
RetCode = _ECAT_Slave_CSP_TargetPos_Change(gESCCardNo, gNodeID[0],
gSlotID[0], NewPos);
// Replace the current position with a new position.
To replace the current speed with a new speed, press the Change key in Velocity Change
section (as shown in figure 3.6.2.5) to execute the following program:
RetCode = _ECAT_Slave_CSP_Velocity_Change(gESCCardNo, gNodeID[0], gSlotID[0],
NewSpd, NewTdec);
// Replace the current speed with a new speed.
3-24
Figure 3.6.2.5
EtherCAT Programming Guide
March, 2017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents