
Counts how many times this block was executed
Category: Source
This block can be used to count how many times a diagram was executed. This increment can happen in a task or Finite State machine.
The block behavior is defined by:
Figure 1 shows the Counter Properties dialog with the 'Initial Condition,' 'Step,' and 'Reset' parameters being configured.

Figure 1 - Counter block dialog
Figure 2 shows an example of two Counter block in a Task with 1s of period. Both of them have the Initial Condition and Step equal to 1 but Counter block 2 has a reset value equal to 5 and Counter block 1 reset is disable.

Figure 2 - Two Counter signals in a Scope
Defines the initial condition of the Output Signal. This value will be used again in a reset situation.
Defines the step value increment used in every execution of the block.
Enable or disable reset of the Counter block.
When the counter achieves the reset value the counter block will reset.
Returns the current counter value.
About MWF
MWF is a traditional Brazilian company that provides a wide range of electronic and mechatronic products for industry sectors such as automotive, agricultural machinery and aerospace.
Contact Us
Rua Doutor Siqueira, 139 / Sala 804 Campos dos Goytacazes - RJ, Brasil
contact@mwf-technologies.com
© 2018-2026 MWF. All rights reserved.