Purpose

The module Counter implements an integer counter field with configurable bounds and increments.

Using trigger fields (buttons), the counter value can be incremented, decremented or reset to a specified start value.

Moreover, the module supports time-triggered counting, e.g. to implement countdowns, etc.

Windows

Default Panel

../../../Modules/Macros/Helpers/mhelp/Images/Screenshots/Counter._default.png

Parameter Fields

Field Index

Auto Step Interval s: Double Reset: Trigger
Auto-update every: Bool Start Value: Double
Check Consistency: Bool Step Direction: Enum
Current Value: Double Step Down: Trigger
Loop: Bool Step Size: Double
Max Value: Double Step Up: Trigger
Min Value: Double  
Perform Step: Trigger  

Visible Fields

Current Value

name: currentValue, type: Double, default: 0

Shows the current counter value.

Min Value

name: minValue, type: Double, default: 0

Sets the minimum value for the interval to count in.

Max Value

name: maxValue, type: Double, default: 1

Sets the maximum value for the interval to count in.

Start Value

name: startValue, type: Double, default: 0

Sets the start value to count from.

Step Size

name: stepValue, type: Double, default: 1, deprecated name: increment

Sets the step size for a counting step.

Loop

name: loop, type: Bool, default: TRUE, deprecated name: cyclic

If checked, the module continues counting at the minimum value once the maximum value is reached and vice versa.

Otherwise, the module stops.

Check Consistency

name: checkConsistency, type: Bool, default: TRUE

If checked, the Min Value, Max Value, Start Value, and Current Value are kept in a consistent state, i.e. Min <= Start/Current <= Max always holds.

Auto Step Interval s

name: autoStepInterval_s, type: Double, default: 1, minimum: 0.001, maximum: 1e+06

Sets the number of seconds after which the module automatically performs a counting step.

Auto-update every

name: autoStep, type: Bool, persistent: no

If checked, the module automatically counts after Auto Step Interval s seconds.

Step Direction

name: stepDirection, type: Enum, default: Up

Defines the step direction.

Values:

Title Name
Up Up
Down Down

Perform Step

name: performStep, type: Trigger

If pressed, a counting step is performed.

Step Up

name: up, type: Trigger, deprecated name: addIncrement

If pressed, a counting step up is performed, independent of the setting in Step Direction.

Step Down

name: down, type: Trigger, deprecated name: subtractIncrement

If pressed, a counting step down is performed, independent of the setting in Step Direction.

Reset

name: reset, type: Trigger, deprecated name: resetCounter

If pressed, the Current Value is reset to the minimum value.