The basics of counting, measurement and position detection
2.2 Basics of counting, measuring and position input (TM Count, TM PosInput, Compact CPU)
Counting, measurement and position detection
Function Manual, 12/2017, A5E32009889-AG
47
Setting by the user program up to comparison value
You can set the respective digital output to 1 (edge) by setting the control bit (Page 185)
SET_DQm. The respective digital output is set to 0 by any of the following events:
● Match of the counter value and the comparison value in the configured direction of the
comparison event
● Reset of the corresponding SET_DQm control bit.
The figure below shows an example of the comparison event when counting in an upwards
direction:
You can disable the digital output before the counter value reaches the comparison value by
setting the control bit SET_DQm to 0.
Note
If the comparison value is reached in the configured count direction, the feedback bit
EVENT_CMPm is set independently of the state of the control bit SE
T_DQm.
The comparison event switches a digital output when a count pulse reaches the respective
comparison value. The digital output does not switch when the counter value is set, by
synchronization for example.