Step chain| This function block works through a
list of steps one after the other. For each step you define how long
it lasts and what makes it advance: the elapsed time, a condition
being met, both together, or manual advancing only. Typical applications are irrigation zones opened one after another, a flushing cycle, a heat-up program, a cleaning run or a demonstration sequence. Every step has its own output that is 1 exactly while that step is running. In addition there are the current step number, the remaining time of the running step and four freely assignable step values that are stored per step. |
How it works
|
|||||||||||||||||
| Starting | A rising edge at input ST starts the sequence at the
first step. If the sequence is already running the edge is ignored,
so a running sequence is not accidentally restarted from the
beginning. |
||||||||||||||||
| Advancing | For every step the "Steps" list defines what ends
it:
|
||||||||||||||||
| Condition as a formula | Instead of waiting for a single input, the condition can
also be calculated. The step list has a "Formula" column for that. Inside
the formula the condition inputs are called B1 to B8, exactly as they are
named on the function block. This removes the helper blocks you would otherwise have to place in front of the input. Instead of wiring up a comparator, the comparison is written down directly:
The formula yields true or false: anything other than 0 counts as met. The full language is described in the formula editor, opened by the button next to the input field - it also checks the formula continuously and marks the position of an error. If a formula is entered, it applies; the column "Condition B1-Bx" is then not evaluated. If "Inverted" is ticked, the result of the formula is inverted as well. Important: if a formula cannot be compiled - for example because it uses B5 while the block only has two condition inputs - the condition counts as not met and the step stays put. That is the safe direction; the corresponding message appears in the controller log. |
||||||||||||||||
| Branching | A sequence does not have to be a plain chain. The column
"Formula step" defines where things continue after this step:
The target is calculated only when advancing, that is at the moment the step ends. "When do I move on" and "where do I go" therefore stay separate: the columns duration, advancing and condition determine the when, the column "Formula step" the where. Advancing manually via input WS follows the target as well. If the formula yields a number that does not exist, the sequence continues with the next step - a typing mistake therefore does not hold it. The controller reports this once per step in the log. Ping-pong between two steps without duration cannot block the controller: never more step changes are carried out in a row than there are steps. |
||||||||||||||||
| Time measurement | The duration is measured with timestamps and not
counted down. Variations of the cycle time therefore do not shift
the sequence, and the deviation does not add up across many
steps. |
||||||||||||||||
| Pausing | While input PA is 1 the sequence is held. The
remaining time of the running step is frozen and continues with
exactly that remainder after releasing. The output of the running
step stays switched on during the pause. |
||||||||||||||||
| Jumping | When the value at input ZS changes to a valid step
number, the sequence jumps to that step immediately and its duration
starts again. If the sequence is idle the jump starts it; if it is
paused it continues. The value 0 and values above the number of
steps are ignored. |
||||||||||||||||
| End of the sequence | What happens after the last step is defined by the
parameter "Behaviour at the end": stop, start again at the first
step, or jump to a specific step. When stopping, output FE is set to
1 and all step outputs go to 0. |
||||||||||||||||
| Aborting | A rising edge at input SP aborts the sequence. All
step outputs go to 0, FE stays at 0 - an abort is not a regular
completion. |
||||||||||||||||
| Step without duration | A step with duration 0 and advancing "By time" is
left again immediately. This allows intermediate steps that only
change the step values. Never more step changes are carried out in a
row than there are steps, so a chain consisting only of steps
without duration cannot block the controller. |
||||||||||||||||
Inputs
|
||
| ST |
Start |
A rising edge starts the sequence at the first
step. |
| SP |
Stop |
A rising edge aborts the sequence. |
| PA |
Pause |
1 holds the sequence, 0 continues it. |
| WS |
Advance |
A rising edge advances to the next step, regardless
of duration and condition. Only effective while the sequence is
running and not paused. |
| ZS |
Jump to step |
Step number 1 to the number of steps. Every change to
a valid number causes a jump. |
| FR |
Enable |
At 0 no more commands are accepted and the sequence
is paused or aborted depending on the parameter. If the input is not
linked, the block is considered enabled. "Generate variables" therefore creates no address for this input: a newly created address is 0 and would block the function block right away. |
| B1-B8 |
Condition 1 - 8 |
Advancing conditions. The step list defines per step
which condition applies and whether it is evaluated inverted. The
number of drawn inputs results from the parameter "Number of
conditions". In the "Formula" column of the step list these inputs are called B1 to B8 as well, where they can be combined freely. "Generate variables" creates no addresses for these inputs either - a newly created address is 0, which would leave the corresponding step waiting. The conditions are wired up or linked to an existing address. |
Outputs
|
||
| NR |
Current step number |
Number of the running step, starting at 1. When the
sequence is idle, 0 is output. |
| LF |
Running |
1 while a step is active. Stays at 1 during a pause
as well. |
| PS |
Paused |
1 while the sequence is held. |
| FE |
Finished |
1 when the sequence has run through to the end
regularly. At the next start and on an abort the output returns to
0. |
| RZ |
Remaining time of the current step |
Remaining seconds of the running step. For steps
whose advancing does not evaluate a time, 0 is output. |
| W1-W4 |
Step value 1 - 4 |
Up to four independent outputs; how many are drawn is set
by the parameter "Number of step values". In the step list every step has
values of its own, one each for W1, W2, W3 and W4. One output, a different value per step. If you have ten steps and want to provide one value for each of them, W1 alone is enough: the W1 column then holds a different number in each of the ten rows, and output W1 always carries the number of the step currently running. "Number of step values" stays at 1 for that. W2 to W4 are only needed when a single step has to provide several values at once - a temperature and a speed, for instance. Instead of a fixed number a value can also be calculated. There is a formula column per value for that, written over the same inputs B1 to B8 - for example "B1 * 2" or "limit(B1,0,100)". The value is updated continuously while the step is active and therefore follows an actual value at the input. One of the four values is not selected. While a step is running, all four values of that step are present at the same time, each at its own output. When the next step begins, all four change together to the values of the new row. The four outputs are therefore four separate settings the sequence carries along step by step - for example W1 as a valve position, W2 as a speed and W3 as a temperature setpoint. If only one setting is needed, use W1 and leave the other three at 0. When the sequence is idle all four outputs are set to 0. |
| A1-Ax |
Step 1 - x active |
One output per step. Only the output of the step
currently running is 1, all others are 0. The number results from the
number of rows in the step list. |
Parameters
|
|
| Steps |
Opens the step list. One row per step with
designation, duration, advancing, condition and the four step values.
Steps can be added, deleted, moved and duplicated. The number of rows
determines the number of step outputs; 2 to 32 steps are
possible. The column "Condition B1-Bx" holds the number of the condition input: a 2 means this step waits for input B2. 0 means "no condition". The column heading shows how many inputs are currently drawn. If "Inverted" is ticked, the condition counts as met when the input is 0. The column "Formula condition" optionally holds a calculated condition over the same inputs, for example "B1 > 100". If it is filled in, it applies instead of the number. The column "Formula step" defines where things continue after this step - empty means: with the next one. And next to each step value there is a column "Formula W1" to "Formula W4"; if it is filled in, it applies instead of the number. All formula fields work the same way: the field stays empty as long as no formula is stored, otherwise it shows the formula itself. A click opens the editor with a short reference, continuous checking and a marker at the position of an error. As long as a formula is faulty, the dialog cannot be closed with Ok. The toolbar above the list holds the number of step values. It defines how many outputs W1 to W4 the block draws and shows or hides the matching columns along with it. The columns W1 to W4 belong to the outputs of the same name. Every step has four values of its own, and while that step runs all four are present at the same time - one of them is not selected. |
| Number of conditions |
Number of drawn condition inputs B1 to B8; 0 to 8 are
possible. If no conditions are needed the value stays at 0 and the
block stays narrow. |
| Number of step values |
Sits in the toolbar of the step list, not here - that
is where the matching columns are. Number of drawn outputs W1 to W4; 0 to 4
are possible. The
default is 1: one value per step covers the most common case and keeps the
block narrow. 0 leaves the value outputs out entirely. If the number is reduced, the values already entered stay in the step list and reappear as soon as the number is raised again. |
| Behaviour at the end |
|
| Restart step |
Only shown when "Behaviour at the end" is set to "Jump to
step". Step at which the sequence continues when "Behaviour at the end" is set to "Jump to step". If the number exceeds the number of steps, the last step is used. |
| Enable is lost |
|
| After a restart |
What happens when the controller restarts during a
running sequence:
|
| Reset start input |
Only shown when "Behaviour at the end" is set to "Stop" -
only then does the sequence end at all. Sets input ST to 0 at the end of the sequence. If the start is triggered by an address, the next telegram then produces a rising edge again. With a drawn connection to another block the parameter has no effect. |
Example: irrigation
|
|||||||||||||||||||||||||||||||||||||
Irrigation with three
zones opened one after another for ten minutes each. The last step
waits until the tank is full again.
"Number of conditions" is set to 1 and input B1 is connected to the signal "tank full". Outputs A1 to A3 drive the three valves, A4 the filling valve. W1 and W2 show how the step values are meant: W1 carries the pump pressure in percent, W2 the number of nozzles of the zone. Both are present at the same time - while step 2 is running, W1 is 60 and W2 is 2. So there is no switching between W1 and W2; both change together with every step to the values of the new row. W3 and W4 are not needed here and stay at 0. The fourth step ends as soon as the tank is full - but at the latest after 30 minutes, so that a defective float switch cannot hold the sequence permanently. With "Behaviour at the end" = "Jump to step" and restart step 1 the irrigation continues endlessly; with "Stop" it is carried out once and restarted daily by a time switch at input ST. |
|||||||||||||||||||||||||||||||||||||
Example: heat-up program
|
|||||||||||||||||||||||||||||||||||||
Heat-up program for a screed floor. The flow temperature is raised in
stages, and a stage is only left once the screed has actually taken on
the temperature - at the latest after the configured maximum duration,
so that a stuck sensor cannot hold the program.
B1 is the measured screed temperature, W1 goes to the heating circuit controller as a setpoint. "Number of conditions" is set to 1. Here the duration is the maximum length of a stage, not its fixed length - if the screed reaches the temperature earlier, the program moves on earlier. "After a restart" is set to "At the point of interruption": a power failure should not make a program lasting several days start over. |
|||||||||||||||||||||||||||||||||||||
Example: flushing cycle
|
|||||||||||||||||||||||||||||||||||||
Flushing cycle of a drinking water pipe, started by a time switch at
input ST. Between the risers there is a step without duration that only
changes the valve position.
W1 gives the riser number to a selector, B1 is the drain temperature. "Time and condition" here means: flush for at least two minutes and reach 55 degrees while doing so - both have to be fulfilled. The steps with duration 0 are left again within the same cycle. They cost no time and only serve to set the step values cleanly. |
|||||||||||||||||||||||||||||||||||||
Example: cleaning run with acknowledgement
|
|||||||||||||||||||||||||||||||||||||
Cleaning run of a plant that is supervised by an operator. Two steps
run automatically, the third waits for the acknowledgement at input
WS.
Step 3 stays active until somebody presses the button at WS. Output NR is 3 meanwhile, so a status display lets the operator see in the visualisation what is being waited for. Input FR is connected to the safety chain of the plant. "Enable is lost" is set to "Abort", so that an opened protective switch ends the run and does not merely hold it. |
|||||||||||||||||||||||||||||||||||||
Example: demonstration sequence
|
|||||||||||||||||||||||||||||||||||||
Demonstration sequence for a showroom, running endlessly. Each step
sets light, colour and shading together.
W1 is the brightness in percent, W2 the colour temperature in kelvin, W3 the blind position in percent. All three values are present at the same time during their step and change together - that is exactly what the four step values are for. "Behaviour at the end" is set to "From the beginning", input ST is operated by a switch at the showroom entrance. Pressing the stop button at SP ends the demonstration. |
|||||||||||||||||||||||||||||||||||||