Introduction

This library provides the possibility to realise a sequential function chart. It provides function blocks to manipulate the control flow of a program to work gradually along a series of conditions.

The sequential control blocks in this library provide a means of partitioning a program into a set of interconnected steps and transitions.

The actions will be represented by step flags (or tokens). Depending on the state of the step flag, a step is either active or inactive. Each step has an associated set of actions which are executed, if the step is active.

A transition is a passage between steps. Each transition has an associated condition. Depending on the boolean condition, a transition passes a step flag from (one or more) predecessor steps to (one or more) successor steps.

To be able to function properly, a sequence control must have one step active at the start of processing. Such a step is called an initial step or initially active step. Furthermore it needs at least one normal working step and finally a final step to finish the sequence. The steps are interconnected by transitions.

All sequences contained in a Macro or Program block belong to a structure net. A sequence net may also span more than one macro or program block when special sequence connections exist between the single blocks. To connect steps and transitions special data types and connectors are used (TOTRAN and TOSTEP).

Irrespective of the number of steps and hierarchical ordering of sequences, a sequence net is transformed, for the purpose of evaluation, into a separate structural block similar to a macro block. This block is not visible by the user, and has the effect that the runtime evaluation of all steps and associated transitions is performed in one unit.

The processing of the steps occurs according to the sequence connections. So the working process is serialized where all steps are numbered sequentially. The function block numbers have no influence on this numbering scheme.

With the help of the sequence blocks Splitting transition and Joining transition several sequence chains can be created, which are processed simultaneously.

It is also possible to create alternative branches or loops. In this case the programming has to be done very carefully, to not produce unwanted effects for the sequence flow, like dead locks or infinite loops.

The Preset function block can be used to reset a sequence net to a preset configuration.


Joining transition

Symbol:

Description:

This function block is used to end a fork in a sequence control and join two simultaneous chains.

The function block has the inputs SB, TI, TI1 and the output TO. If both steps connected to TI and TI1 have a token and the transition condition is met, i.e. SB is HIGH, a token can pass to the step connected to the output TO. The two incoming token are merged to a single outgoing token.

If no signal is connected to input SB, the transition always allows the passing of tokens.

TI, TI1 and TO have to be connected. Otherwise the download to the target system will be disrupted with an error message.

For general information about sequence function and its realization see the introduction.

Signals:

Name

I/O

Type(s)

Function

TI

I

TOTRANS

Sequence input

TI1

I

TOTRANS

Sequence input

SB

I

BIT

Passing condition

TO

O

TOSTEP

Sequence output

Visualization:

If the transition is not connected properly, the symbol will be depicted red in the run mode.

Comment:

The function block Splitting transition can be used for splitting into two simultaneous chains.


Preset

Symbol:

Description:

This function block is used for setting the system into a predefined state. All blocks of the actual flow are reset and lose its token if they have one. After this, all blocks that are connected by QP0-7 get a token.

Up to 8 token can be distributed by the outputs QP0-7. In this special case the outputs works internal like inputs. If a preset impulse is activated by the input Pres, then the signal processing of the target system will overwrite the actual state of tokens from the step blocks connected to the outputs.

This block works in two steps. First in the actual program cycle, the blocks of this flow net are reset, if there is a 0 to 1 impulse on input Pres. At the following cycle the QP0-7 connected blocks get a token. Please pay attention to the block sequence because of this work process!

For general information about sequence function and its realization see the introduction.

Signals:

Name

I/O

Type(s)

Function

Pres

I

BIT

Activate preset

QP0 .. QP7

I/O

BIT

Blocks to preset

Comment:

A sequence net can be consisted of one or more flows. All flows (even if they are uncoupled) of a structure block are part of the same flow net. Parts of a flow net can be placed in other hierarchical layers. For example a macro block can be used to encapsulate parts of a flow.


Splitting transition

Symbol:

Description:

This function block is used to fork a sequence control into two simultaneous chains.

This function block has the inputs SB, TI and the outputs TO, TO1. If the transition condition is fulfilled, i.e. SB is set to HIGH, the transition allows the passing of a token from a step connected to TI down to both steps connected to the outputs TO and TO1. Both steps will get separate tokens and the processing occurs in parallel.

If no signal is connected to input SB, the transition always allows the passing of tokens.

TI, TO and TO1 have to be connected. Otherwise the download to the target system will be disrupted with an error message.

For general information about sequence function and its realization see the introduction.

Signals:

Name

I/O

Type(s)

Function

TI

I

TOTRANS

Sequence input

SB

I

BIT

Passing condition

TO

O

TOSTEP

Sequence output

TO1

O

TOSTEP

Sequence output

Visualization:

If the transition is not connected properly, the symbol will be depicted red in the run mode.

Comment:

The function block Joining transition can be used for joining two simultaneous chains.


Start

Symbol:

Description:

This function realizes the initial step of the sequence control. It is a special form of the Step function block.

At the beginning of run time the Start block gets a token automatically. A Start block is used to initiate a flow control and normally can’t get a token later. Only by a preset the Start block can get a token at run time. With the Preset function block the flow control are set to a predefined state and so a Start block can get a token again.

This function block contains the outputs SO and SM. The output SM is of the BIT data type. It represent that this block has a token or not. SO has to be connected with a transition. Over this transition the token will be transferred.

For general information about sequence function and its realization see the introduction.

Signals:

Name

I/O

Type(s)

Function

SO

O

TOTRANS

Sequence output

SM

O

BIT

State (token)

Visualization:

If this initial step is currently active, the symbol will be depicted in green. If the function block is connected in a way, which is potentially harmful for the control flow (e.g. aggregation of tokens), it will be depicted in yellow.

Comment:

All flow controls within a structure block are part of the same flow control net. A macro block can be a part of a flow control. For connecting a macro with a flow control block, use the connectors of type TOTRANS or TOSTEP.


Step

Symbol:

Description:

This function block realizes a working step of a sequence control.

The function block has the input SI, the output SO and the output SM. SI has to be connected with a transition. Over this transition the token will be transferred to this block. SO has to be connected with a transition. Over this transition the token will be transferred. The output SM is a BIT data type. It represent that this block has a token or not.

At runtime any Step block can get a token from another Step block by passing the intermediate transition. If the block holds a token, it is active. The block loses the token if a followed transition allows the passing. Then the step is inactive again.

For general information about sequence function and its realization see the introduction.

Parameter:

The parameter dialog can be used to assign a name to the function block. The text will be depicted in the symbol.

Signals:

Name

I/O

Type(s)

Function

SI

I

TOSTEP

Sequence input

SO

O

TOTRANS

Sequence output

SM

O

BIT

State (token)

Visualization:

If the step is currently active, the symbol will be depicted in green. If the function block is connected in a way, which is potentially harmful for the control flow (e.g. aggregation of tokens), it will be depicted in yellow.

Comment:

All sequences contained in a macro or program block belong to a structure net. A sequence net may also span more than on macro or program block, if special sequence connections exist between the single blocks.


Stop

Symbol:

Description:

This function block is used to finish a sequence control. It is a special form of the Step function block.

A token that comes to a Stop block can’t be transferred to another block. Only by a preset the Stop block can lose a token at run time. With the Preset function block the flow control are set to a predefined state and so a token will be detracted from every step, including a Stop block.

The function block has the input SI and the output SM. The output SM is of the BIT data type. It represent that this block has a token or not. SI has to be connected with a transition. Over this transition the token will be transferred to this block.

For general information about sequence function and its realization see the introduction.

Signals:

Name

I/O

Type(s)

Function

SI

I

TOSTEP

Sequence input

SM

O

BIT

State (token)

Visualization:

If this function block is currently active, the symbol will be depicted in green.

Comment:

All flow controls within a structure block are part of the same flow control net. A macro block can be a part of a flow control. For connecting a macro with a flow control block, use the connectors of type TOTRANS or TOSTEP.


Transition

Symbol:

Description:

This function block realizes a transition, i.e. a condition to step forward a sequence control. It is always located between steps.

A transition has the inputs SB, TI and the output TO. SB set the condition of a transition block for passing a token. A HIGH signal allows the passing of a token coming from a step connected to TI down to a step connected to the output TO.

If no signal is connected to input SB, the transition always allows the passing of tokens.

TI and TO have to be connected. Otherwise the download to the target system will be disrupted with an error message.

For general information about sequence function and its realization see the introduction.

Signals:

Name

I/O

Type(s)

Function

TI

I

TOTRANS

Sequence input

SB

I

BIT

Passing condition

TO

O

TOSTEP

Sequence output

Visualization:

If the transition is not connected properly, the symbol will be depicted red in the run mode.