Delta EtherCAT Programming Manual page 72

Table of Contents

Advertisement

EtherCAT Programming Guide
(5) Settings for pulse comparison
Trigger Time: Set the lasting time for triggering the signal.
Trigger count: Set the number of times for signal to be triggered.
Start Position: Set the starting position for signal to be compared.
Interval: Set the interval for signal to be compared. For example, if the value is set to 10,
signal will be triggered every 10 pulses. And the lasting time is determined by Trigger
Time.
ABS.: Check this box to compare the pulse based on the absolute coordinates.
Level: Check this box and the following program will be executed according to channel 1
(CMP_2), which is used to output differential signal:
rt = _ECAT_Compare_Set_Channel1_Output_Mode (gu16_CardNo, gbLevelValue);
// gbLevelValue: Channel 2 output mode of triggering signal.
// 0: Normal type (Users can define the pulse position).
// 1: User-defined type (Users can define the pulse position and determine the triggering
signal is low or high).
One Shot: Press this key, trigger the signal once and the following program will be
executed:
rt = _ECAT_Compare_Set_Channel_Trigger_Time (gu16_CardNo, u16_Channel,
time_us);
// time_us = The lasting time of this triggered signal; unit: us
rt = _ECAT_Compare_Set_Channel_One_Shot (gu16_CardNo, u16_Channel);
// Actual triggered signal outputted
Set: Select from >>> and <<< (direction) and the following program will be executed:
rt = _ECAT_Compare_Get_Channel_Position (gu16_CardNo, gu16_Qep, &i32_Pos )
// gu16_Qep: Pulse source for comparision
// &i32_Pos: Returns current incremented pulse (current position)
Select Type 0 for applying channel 0 (CMP_1) as the differential signal output channel to
output the triggered signal. (Compare the pulse at a fixed pulse interval)
rt = _ECAT_Compare_Channel0_Position (gu16_CardNo, i32_StartPoint, 0,
u32_CompareCount);
// i32_StartPoint: The starting position for pulse comparison
// u32_CompareCount: Pulse count for comparison
March, 2017
Figure 3.11.2.5
EtherCAT Operation Example
3
3-51

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents