kitControl-Counter

This component counts Boolean inactive to active transitions. It supports counting up, counting down, presetting, and clearing.

The Counter is available in the Util folder of the kitControl palette.

Figure 1. Counter properties

The screen capture shows a counter component property sheet.

PropertyValueDescription
FacetsConfig Facets window (defaults to null units, a single decimal place, minimum to negative infinity, maximum to positive infinity)

Selects units and configures how the value displays:

units defines the unit of measure fromacceleration to volumetric flow.

precision defines the number of decimal places.

min defines the lowest value allowed.

max defines the highest value allowed.

This definition applies to the Out value for this component.

Outnumber (defaults to 0.0) and null definitionReports the current count.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Count Uptrue or false (default) and null definitionDefines a StatusBoolean input. When this input transitions from inactive to active, the value of the Out property increments by the Count Increment value.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Count Downtrue or false (default) and null definitionDefines a StatusBoolean input. When this input transitions from inactive to active, the Out property decrements by the Count Increment.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Preset Intrue or false (default) and null definitionDefines a StatusBoolean input. When this input transitions from inactive to active, the Out property decrements by the Count Increment.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Clear Intrue or false (default) and null definitionDefines a StatusBoolean input. When this input transitions from inactive to active, the framework sets the Out property to 0.0.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Preset Valuenumber (defaults to 0.00) and null definitionDefines the value of the Out property when Preset In changes to active, or when a user invokes the Preset action.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Count Incrementnumber (defaults to 1.00) and null definitionDefines how much the Out property increases or decreases when a StatusBoolean transitions from inactive to active.

When null value is checked, the value displayed defaults to the incoming value from the device. If you remove the check mark you can configure the In value.

Actions

These actions are available when you right-click.

Action Description
Preset Sets the Out property value to the Preset Value.
Clear Sets the Out property value to 0.00.

Examples

This wire sheet shows an application that ramps between the RampMaxValue and the RampMinValue. The period of the Multi Vibrator object sets how fast the ramp counts. The Clock input of the BooleanLatch object config flags is set to allow fan-in.

Figure 2. Counter component ramp up and down


The next wire sheet shows a count from the RampMaxValue down to zero (0), which is then reset back to the RampMaxValue and repeated.

Figure 3. Counter component ramp down, reset and repeat