Delta EtherCAT Programming Manual page 73

Table of Contents

Advertisement

EtherCAT Operation Example
Select Type 1 for applying channel 1 (CMP_2) as the differential signal output channel to
output the triggered signal. (Compare the pulse at user-defined pulse intervals. In this
example, the result of simulated pulse comparison at a fixed pulse interval is similar to
3
Type 0. Users can define different intervals according to the demand.)
Disable the differential signal output function of channel 2 first:
rt = _ECAT_Compare_Set_Channel1_Output_Enable (gu16_CardNo, 0);
// 0: Disable
// 1: Enable
If you do not check the Level box, the following program will be executed:
rt = _ECAT_Compare_Set_Channel1_Position_Table (gu16_CardNo,
&pi32_PointTable[0], u32_CompareCount);
// &pi32_PointTable: Data array. It is used for storing the compared pulse.
// u32_CompareCount: Pulse count comparison, which should be identical to the size of
data array.
Pulse comparison:
If you check the Level box, the following program will be executed:
rt = _ECAT_Compare_Set_Channel1_Position_Table_Level (gu16_CardNo,
&pi32_PointTable[0], &pu32_LevelTable[0], u32_CompareCount);
// &pi32_PointTable: Data array. It is used for storing the compared pulse.
// &pu32_LevelTable: Data array. It is used for storing the triggered level.
// u32_CompareCount: Cout of pulse comparison, which should be identical to the size of
data array.
Pulse comparison:
3-52
Figure 3.11.2.6 Compare the pulse at a fixed pulse interval
Figure 3.11.2.7 Compare the pulse at user-defined pulse intervals
EtherCAT Programming Guide
March, 2017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents