Counter
Applicable to OS V1.2-1.4
The Counter component adds up the number of rising edges received on the In slot. The counting direction in the component may be set upwards or downwards, and counting steps are set by integer values. If needed, the starting value may be set for the component (for example, counting starts at 100 and goes down every rising edge; 0 is not a threshold).
The Counter component has the following slots:
- Status: indicates the current status of the component (OK, Fault);
- Out: the value representing the number of rising edges received on the In slot and taking into account the counting steps set in the Inc slot: if the Inc slot value is 2, and the In slot received 2 rising edges, the value transferred to the Out slot is 4;
- In: the input slot receiving Boolean values from linked components;
- Reset: sets the Out slot value to the value set in the Init Value slot;
- Init Value: the initial value of the Counter (set manually); by default, the initial value is set to 0;
- Increment: counting steps (set manually); by default, counting steps are set to 1;
- Direction: the counting direction (set manually); by default, the counting direction is set to Up.
The Counter component has the following action:
- Reset: sets the Out slot value to the value set in the Init Value slot.
ActionTrigger Extension
The ActionTrigger extension is designed to invoke any action that is available for the component. The extension triggers an action selected in the Action Name on the rising edge of the Action Trigger slot. If the action has parameters to set, the parameter is taken from a relevant slot automatically added to the extension (Analog Value/Binary Value/String Value).
It is possible to add more than one ActionTrigger extension to the component (for example, one for each action in the component).
The extension is added from the context menu of the component.
![](../../__attachments/542375967/41%20Action%20Trigger.png?inst-v=99fab5a7-671f-4b8f-9877-4c441fa1b4fd)
The ActionTrigger extension has the following slots:
Action Name: allows to select an action to invoke;
Action Trigger: triggers an action selected in the Action Name slot;
Action Analog Value/Action Binary Value/Action String Value: a slot added automatically to the extension if an action selected in the Action Name slot has any specific parameters to set (depending on the type of action and its parameters, the relevant type of value is matched).