Overview Plus/Minus

This function block implements a plus/minus counter. Important: See the notes on using the counter blocks.


Inputs

PL
Plus
A positive edge at the input increases the counter value by 1.
MI
Minus
A positive edge at the input decreases the counter value by 1.
RS
Reset
A positive edge at the input resets the counter value.

Outputs

ZS
Counter value
Current counter value
MI
Minimum
Output becomes 1 when the counter value has reached or fallen below the parameter Minimum. If Minimum and Maximum are set to the same value, the output stays 0.
MA
Maximum
Output becomes 1 when the counter value has reached or exceeded the parameter Maximum. If Minimum and Maximum are set to the same value, the output stays 0.

Parameters

Minimum
Minimum counter value. Minimum and Maximum are only evaluated when they are set to different values.
Maximum
Maximum counter value. Minimum and Maximum are only evaluated when they are set to different values.
Min/max limit
If this parameter is set, the counter value stays between Minimum and Maximum. Without this parameter the block keeps counting beyond Minimum and Maximum.
Reset if below minimum
The counter is set to the init value automatically as soon as the counter value reaches or falls below the Minimum. The check is done after every counting step, when counting up as well as when counting down.
Reset if above maximum
The counter is set to the init value automatically as soon as the counter value reaches or exceeds the Maximum. The check is done after every counting step, when counting up as well as when counting down.
Init value after reset
After a reset the counter is initialized with this counter value. The value is also used when the counter is reset automatically by one of the two parameters Reset if below minimum or Reset if above maximum.


Important: See the notes on using the counter blocks.




See also common parameters of all function blocks.