Pre-installed application - generating a controllable test signal using a counter

A flag is configured as a counter that will be incremented each seconds using an interval timer.

Adding the flags

Menu Data pointsFlags

One flag for the counter and one flag for the running direction of the counter are added for this. Both flags are signed integers and their value persists a restart of the application.

de app counter flags

Configuration of the incrementation

Menu Data pointsTimer → edit Counter_Timer ()

A timer of the type Interval is added here, which expires (triggers) every second.

de app counter timer

Menu Events → edit Counter_Count ()

An event is added here, which triggers an action with each expiry of the timer timer2 - Counter_Timer, which increments the value of data point flag3 - Counter by the value of data point flag4 - Counter_Direction.

de app counter event count

Inputs of the router or MQTT messages can be used to change the running direction of the counter or reset it (see here for digital inputs and here for MQTT).