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 109.   Counter properties
Image

The screen capture shows a counter component property sheet.

Property Value Description
Facets Config 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.

Out number (defaults to 0.0) and null definition Reports 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 Up true or false (default) and null definition Defines 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 Down true or false (default) and null definition Defines 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 In true or false (default) and null definition Defines 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 In true or false (default) and null definition Defines 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 Value number (defaults to 0.00) and null definition Defines 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 Increment number (defaults to 1.00) and null definition Defines 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 110.   Counter component ramp up and down
Image

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 111.   Counter component ramp down, reset and repeat
Image