COUNTER and COUNTER EVENT
COUNTER block allows you to set certain events to the corresponding pulse number of the input signal. To use the counter, it is necessary to generate a counting signal at the first input “IN”, set the maximum number of samples at the second input “Max” and a text parameter to determine whether the counter events belong (determines which counter the COUNTER EVENT block belongs to) on the third input “Tag”.
COUNTER EVENT block is activated when the counter with the “Tag” parameter reaches the value set at input 1, marked “#”. The example above shows a circuit in which, when a high signal is input to input IN1, at the first pulse, event number 1 will be executed and high signal will appear at OUT1; with the second pulse, event number 2 will be executed: a high signal will appear at the output of OUT2, a low signal at the output of OUT1. At the third pulse, the counter will be reset and a low signal will be present at both outputs.