The basics of counting, measurement and position detection
2.3 Basics of counting (TM Timer DIDQ)
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
77
Counting with incremental encoder
You can use a few channels of a TM Timer DIDQ for simple counting tasks with an
incremental encoder. Counting refers to the recording and adding up of events. The
channels configured as counters each acquire the two incremental signals and evaluate
these accordingly.
The technology module can count up and down with an incremental encoder. You change
the count direction by inverting it.
The counting limits define the counter value range used.
The minimum counter value is -2147483648 (-2
31
). The maximum counter value is
2147483647 (2
31
-1). The respective counter counts continuously. At an overflow, the counter
jumps to the other counting limit in each case and continues counting.
The counter value cannot be influenced by the user program.
For use of a counter for an incremental encoder, two digital inputs each of a channel group
are combined. For this purpose, you choose the configuration "Incremental encoder (A, B
phase-shifted)" in the channel parameters for the respective group.
Note
Counters of the TM Timer DIDQ 16x24V
The number of available counters of the TM Timer DIDQ 16x24V is dependent on the
channel configuration. In order to use 4 counters, you
must choose the use of 8 inputs in the
channel configuration. If you choose the use of 3 inputs, you can use 1 counter. Other
channel configurations do not allow any counter use.
The current counter value is indicated in the feedback interface in the TEC_IN value (DIm).
DIm corresponds to the first of the two grouped digital inputs in each case. For the second
digital input, "0" is returned in the value TEC_IN (DIm+1).