EtherCAT Programming Guide High Speed Pulse Compare Function
March, 2017 27-11
27
27.8 _ECAT_Compare_Set_Channel_Enable
Syntax
U16 PASCAL _ECAT_Compare_Set _Channel_Enable (U16 CardNo,
U16 compare_channel,U16 enable)
Purpose
Enable/disable the high speed compare function of the specified channel.
Note:
1. Channel 0 can only be enabled/disabled with this API.
2. Apart from this API, channel 1 needs to be enabled/disabled with API
“_ECAT_Compare_Set_Channel1_Output_Enable”. Otherwise, this channel will not be triggered even
when the pulse is matched.
Parameter
Name Data type Property Description
CardNo U16 Number Card No.
Compare_channel U16 Number Channel No., which range is 0 ~ 1.
enable U16 Option
0: Disable the compare function.
1: Enable the compare function.
Example
U16 CardNo = 0, ;
U16 compare_channel = 0;
U16 enable = 1;//Enable the high-speed compare function.
U16 status = _ECAT_Compare_Set Channel_Enable (CardNo, compare_channel, enable);