Get Last Event Counter

Reads the time stamp of the last output compare event.

Description

Each time an output compare event occurred on a timer channel, the value of the timer module's internal 16-bit free running counter is saved. This block gives you access to this timestamp value of the free running counter. As an example this is useful to create an exact square wave. For this each wave transistion need to be scheduled as an output compare event and the next event time can be derived from the last event counter.

Output

16-bit free running counter timestamp of the last output compare event.
The used datatype is of uint16.

Parameters
Timer Output Pin
Selects the timer channel.
Sample time
Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model.