Epec CAN Module Family
2024 CONTROL MODULE
19 / 34
07.10.2010
2024G08,G18 / MAN000185
Epec Oy reserves all rights for improvements without prior notice
Epec Oy Postiosoite/Postal address Puhelin/Phone Fax Internet
Tiedekatu 6 PL/P.O.Box 194 +358-(0)20-7608 111 +358-(0)20-7608 110 www.epec.fi
FIN-60320 Seinäjoki FIN-60101 Seinäjoki, Finland
3.7 Digital Input / Pulse Input
Pins X3.16…X3.23 are ground referenced inputs (DI) including pulse counting (PI) feature.
These pins have 10 kΩ resistor connected to GND.
The application program is provided with frequency and number of the pulses seen in the input
in addition to the normal input state.
There are three variables associated with each pin of this type in IEC programming
environment. The first is a bit variable in the IX area just in the same way as with the pins
without the PI features. The other two are word variables in the IW memory area which hold the
frequency value and the number of pulses.
After starting up the module measures only the pulse frequency. Pulse counting, if needed,
must be enabled explicitly by the application program.
The pulse counting competes with the application program and other processes for the CPU
time. This makes it rather hard to estimate the actual maximum frequency of the pulses that the
module is able to count reliably. The maximum frequencies given in the table below are such
frequencies which make the module to freeze in practice if all inputs are connected to their
maximum frequencies. It means that to be able to reach the maximum frequencies, there is no
room for application program or any other processes like CAN traffic. So, the practical limits are
lower but the maximum values of the table still give the basis for the estimation.
Inputs of this type are also suitable for quadrature sensor position counting. Any of these inputs
can be logically paired with another similar input. The result is a two channel pulse counter
which is capable of detecting the direction of the movement of the sensor. The pairing is done in
application program.
The pulse count and pulse frequency can be read from the pulse input channels. The following
table shows the IW-addresses where to read the wanted data (when using CoDeSys 2.1).
Pulse Input channels
Channel Pin Pulse Frequency Pulse Count
0 X3.23 %IW150 %IW160
1 X3.17 %IW151 %IW161
2 X3.16 %IW152 %IW162
3 X3.20 %IW153 %IW163
4 X3.19 %IW154 %IW164
5 X3.18 %IW155 %IW165
6 X3.22 %IW156 %IW166
7 X3.21 %IW157 %IW167
For more information on pulse input channels refer to Hardware Library manual (HW lib).