Delta EtherCAT Programming Manual page 71

Table of Contents

Advertisement

EtherCAT Operation Example
TCount: Number of the compared times.
rt = _ECAT_Compare_Get_Channel1_Position_Table_Count (gu16_CardNo,
&u32_Count);
3
/* Obtain the number of compared times. */
(4) MPC parameter settings
Enable: Enable/disable compare function. The following program is executed:
rt = _ECAT_Compare_Set_Channel_Enable (gu16_CardNo, u16_Channel, 1);
// 1: Enable
// 0: Disable
Inpulse Type: Select between AB Phase or CW_CCW mode. The following program is
executed:
rt = _ECAT_Compare_Set_Ipulser_Mode (gu16_CardNo, mode);
// 0: AB Phase
// 1: CW_CCW
Reset: Press this key to clear the pulse count of QEP1 and QEP2, and the following
program will be executed:
rt = _ECAT_Compare_Set_Channel_Position (gu16_CardNo, u16_Channel, 0);
// 0 represents the pulse number. It means to set the accumulated pulse position to 0.
QEP1 Inverse: Pulse incremental way of QAQB 1. Press this key and the following
program will be executed:
rt = _ECAT_Compare_Set_Channel_Direction (gu16_CardNo, 0, dir);
// 0: Signal source QA1, QB1
// dir:
// 0: Incremented pulse count
// 1: Decremented pulse count
QEP2 Inverse: Pulse incremental way of QAQB 2. Press this key and the following
program will be executed:
rt = _ECAT_Compare_Set_Channel_Direction (gu16_CardNo, 1, dir);
// 1: Signal source QA 2, QB 2
// dir:
// 0 = Incremented pulse count
// 1 = Decremented pulse count
3-50
Figure 3.11.2.4
EtherCAT Programming Guide
March, 2017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents