Ecat_Compare_Set_Channel0_Trigger _By_Gpio; Ecat_Compare_Set_Channel_Enable - Delta EtherCAT Programming Manual

Table of Contents

Advertisement

EtherCAT Programming Guide

27.10 _ECAT_Compare_Set_Channel0_Trigger _By_GPIO

Syntax
U16 PASCAL _ECAT_Compare_Set_Channel0_Trigger_By_GPIO (U16 CardNo, U16 dir, U16
interval, I32 trigger_cnt)
Purpose
Set the parameters for triggering the signal at a fixed pulse interval of channel 0, which function
is triggered via PIN10 of CN2 connector (GPIO, general-purpose input/output)
Note:
1.
Before GPIO is enabled, please make sure channel 0 is enabled by API

"_ECAT_Compare_Set_Channel_Enable".

2.
About the triggering retaining time, please refer to section 27.5
"_ECAT_Compare_Set_Channel_Trigger_Time".
3.
Output signal of channel 0 is triggered via PIN11 and PIN12 of CN2 and CN9 connector on motion card
PCI-L221-B1. These two sets of points will both be triggered when pulses are matched.
Parameter
Name
CardNo
Dir
Interval
Trigger _cnt
Example
U16 CardNo = 0;
U16 Dir = 1;
U16 Interval = 10;
I32 trigger_cnt = 50000;
U16 status = _ECAT_Compare_Set_Channel0_Trigger_By_GPIO (CardNo, Dir, Interval,
trigger_cnt);
/* The motion card starts comparing pulses from position 100000 and channel 0 will be triggered
once every 10 pulses with total trigger count 50000. */
/* That is, when the pulse is 100010, 100020, 100030, ..., 600000, channel 0 will be triggered
once.*/
Description
The comparing method is the same as that described in Chaper 27.9
"_ECAT_Compare_Channel0_Position". However, to enable this compare function, the GPIO
(PIN 10 of CN2) has to be set to on.
March, 2017
Data type
Property
U16
Number
U16
Numeric value
U16
Option
I32
Pulse number
High Speed Pulse Compare Function
Description
Card No.
0: forward
1: backward
Pulse number of each interval
Pulse interval for carrying out the compare.
27
27-13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents