Overview Step switch


This function block implements a step switch. Depending on the numeric value at input ST, either exactly one step is switched on (type Exclusive) or all steps up to the step reached are switched on (type Inclusive). Typical applications are fan steps, heating steps or an indication of which range is currently reached.

For every step a value range From/To is set under "Limits". A step is considered reached when the input value lies within this range, both limits belong to the range. Every step has its own output.

This block has a similar function to the selector switch 1-N, but with fewer parameters for easier use.


How it works

Evaluation The value at input ST is evaluated as an integer, decimal places are truncated. The value is compared one after another with the From/To range of every step.
Type Exclusive Every step whose range contains the input value is set to 1, all others to 0. With cleanly separated ranges exactly one output is switched on at any time.

If the input value does not match any range, all outputs are set to 0. This is how the state "all off" is represented.

If ranges overlap, several outputs are switched on at the same time.
Type Inclusive The highest step whose range contains the input value is determined. This step and all steps below it are set to 1, all steps above it to 0.

Important: If the input value does not match any range, the outputs remain unchanged. In this mode at least one output is therefore switched on as soon as a step has been reached once. If the state "all off" is required, use the type Exclusive.
Switching order When the step changes, all outputs to be switched off are set to 0 and sent first, only then the outputs to be switched on are set to 1. This applies to switching up and down alike, so two steps are never active at the same time, not even briefly. The outputs can therefore be wired directly to contactors that interlock each other.
Sending The outputs are only written on a change. If the input value changes within the same range, nothing is sent.


Inputs

ST
Step
Numeric value that determines the step. The value is compared with the ranges set under "Limits".

Outputs

A1-Ax
Step 1 - x
One output per step, in the order of the "Limits" list. If the step is reached, the output is set to 1, otherwise to 0. The number results from the parameter "Number of steps". From the eleventh output on, only the number is shown.


Parameters

Number of steps
Number of steps and therefore of outputs, 2 to 64 are possible. If the number is increased, the new rows in the "Limits" list are created with 0.
Delay
Waiting time in seconds between the change at the input and the switching of the outputs, 0 switches immediately.

The time is started with the first change and is not restarted by further changes. After it has elapsed, the value present at that moment is evaluated. Changes following each other quickly are combined in this way, the outputs switch only once. This protects contactors and motors if the input value comes from a controller, for example.
Type
  • Exclusive: Only the step reached is switched on, all others are switched off.
  • Inclusive: The step reached and all steps below it are switched on.
The differences are described above under How it works.
Limits
Opens the list of steps. For every step the value range is entered with "From" and "To", both limits belong to the range. The ranges do not have to be of equal size, but they should not overlap.

Important: New rows are set to From 0 / To 0. If the limits are not set, all outputs are switched on at the same time with an input value of 0.


Example

Fan with three steps, the input ST is written by an operating element with the values 0 to 3. "Number of steps" is 3, the limits are step 1 = 1 to 1, step 2 = 2 to 2 and step 3 = 3 to 3.

Input ST Exclusive Inclusive
0 A1 = 0, A2 = 0, A3 = 0 outputs remain unchanged
1 A1 = 1, A2 = 0, A3 = 0 A1 = 1, A2 = 0, A3 = 0
2 A1 = 0, A2 = 1, A3 = 0 A1 = 1, A2 = 1, A3 = 0
3 A1 = 0, A2 = 0, A3 = 1 A1 = 1, A2 = 1, A3 = 1

If the fan also has to be switched off, use the type Exclusive, because with the type Inclusive the value 0 does not match any range. Alternatively, an additional step for "off" can be created with the type Inclusive, whose output is not used.

If ranges are evaluated instead of fixed steps, a brightness in percent for example, the limits can also be 0 to 33, 34 to 66 and 67 to 100.

See also common parameters of all function blocks.