0% found this document useful (0 votes)
50 views

Zenon Manual: Command Sequencer

zenon command sequencer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Zenon Manual: Command Sequencer

zenon command sequencer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 127

zenon manual

Command Sequencer

v.7.60
©2017 Ing. Punzenberger COPA-DATA GmbH

All rights reserved.

Distribution and/or reproduction of this document or parts thereof in any form are permitted solely
with the written permission of the company COPA-DATA. Technical data is only used for product
description and are not guaranteed qualities in the legal sense. Subject to change, technical or
otherwise.
Contents

1. Welcome to COPA-DATA help ...................................................................................................... 5

2. Command Sequencer ................................................................................................................... 5

3. Introduction ................................................................................................................................ 6
3.1 Command Processing - supported action types.......................................................................................... 7
3.2 Variables for command sequences ............................................................................................................. 7
3.2.1 Examples of views: Display name in the command sequence grid .............................................. 9
3.3 Display of the action name in Runtime: ...................................................................................................... 9

4. Terminology .............................................................................................................................. 10

5. Procedure.................................................................................................................................. 12

6. Licensing ................................................................................................................................... 13

7. Engineering in the Editor............................................................................................................ 14


7.1 Create a command sequence screen ........................................................................................................ 14
7.2 zenon functions ......................................................................................................................................... 15
7.2.1 Execute command sequence or mode change ........................................................................... 15
7.2.2 Export command sequences ...................................................................................................... 19
7.2.3 Import command sequences ...................................................................................................... 22
7.2.4 Teach command sequences ....................................................................................................... 25
7.3 Command sequence screen switching ...................................................................................................... 27
7.4 Command Processing actions in the Command Sequencer module ........................................................ 27
7.4.1 Behavior of "Check response value" action type ....................................................................... 27
7.4.2 Setpoint input for a Command Processing action ...................................................................... 29
7.4.3 Skip action for identical set value and actual value ................................................................... 30

8. System driver variables for the Command Sequencer module ..................................................... 30

9. Project backup for command sequences .................................................................................... 34

10. Function authorizations ............................................................................................................. 35

11. Command sequences in Runtime ............................................................................................... 35

3
11.1 Command sequences editor ..................................................................................................................... 36
11.1.1 Context menu - tabs with opened command sequences ........................................................... 38
11.1.2 Dockable windows - list of command sequences ....................................................................... 40
11.1.3 Command sequence grid ............................................................................................................ 55
11.1.4 Modes ......................................................................................................................................... 60
11.1.5 Toolbar - command sequences editor (edit mode) .................................................................... 62
11.1.6 Toolbar - Command sequences editor (execution mode) .......................................................... 92
11.2 Create command sequence ...................................................................................................................... 94
11.3 Tooltips ..................................................................................................................................................... 95
11.4 Execution status ........................................................................................................................................ 96
11.5 Symbols and Color .................................................................................................................................... 98
11.6 Validate command sequence .................................................................................................................... 99
11.7 Teaching .................................................................................................................................................. 101
11.7.1 Teaching process ...................................................................................................................... 101
11.7.2 Dialog when teaching is canceled............................................................................................. 102
11.7.3 Engineering ............................................................................................................................... 106
11.8 Configuration rules for command sequences ......................................................................................... 107
11.9 CEL entries............................................................................................................................................... 109

12. Command sequences and simulation mode .............................................................................. 111


12.1 Import command sequence(s) from simulation image ........................................................................... 111
12.2 Creating a simulation image ................................................................................................................... 113

13. Command sequences in the zenon network.............................................................................. 114


13.1 Particular aspects for the Command Processing screen ......................................................................... 115
13.2 Simulation images in network projects ................................................................................................... 115
13.3 Behavior in the zenon network ............................................................................................................... 116
13.4 Authorization .......................................................................................................................................... 118

14. Command sequences on the web client.................................................................................... 118

15. Authorization .......................................................................................................................... 119

16. Structure of the XML file for command sequences .................................................................... 119
16.1 XML structure for elements - complete overview .................................................................................. 124

4
Welcome to COPA-DATA help

1. Welcome to COPA-DATA help

ZENON VIDEO TUTORIAL S

You can find practical examples for project configuration with zenon in our YouTube channel
(https://www.copadata.com/tutorial_menu). The tutorials are grouped according to topics and give an
initial insight into working with different zenon modules. All tutorials are available in English.

GENERAL HELP

If you cannot find any information you require in this help chapter or can think of anything that you
would like added, please send an email to [email protected]
(mailto:[email protected]).

PROJECT SUPPORT

You can receive support for any real project you may have from our Support Team, who you can contact
via email at [email protected] (mailto:[email protected]).

LICENSES AND MODULES

If you find that you need other modules or licenses, our staff will be happy to help you. Email
[email protected] (mailto:[email protected]).

2. Command Sequencer
The Command Sequencer module allows commands from the Command Processing module to be
compiled into processes in zenon, to visualize these and to execute user interactions if required.

5
Introduction

3. Introduction
The Command Sequencer module consists of three parts:
1. The engineering environment in the zenon Editor:
Here, the data for command sequences is applied from the configuration in the Command
Processing module.

2. The command sequences editor in zenon Runtime:


With this Editor, the command sequences are created in zenon Runtime. The engineered
Command Processing is the basis for command sequences. During the process, the respective
status of the Command Processing is displayed in the command sequences editor and you can
make changes to the command sequence process.

PARTICULAR ASPECTS OF THE COMMAND SEQUENCER MODULE

In contrast to most other zenon modules, a large part of the project configuration, e.g. the creation of a
command sequence, is done in Runtime and not in the zenon Editor. This entails special features which
are dealt with in the respective chapter.

The module is designed in a way which makes it completely independent of the control. This means that
the data communication take place via all available zenon energy drivers with any PLCs or even IED.
They only execute the process actions. The complete editing of a command sequence is carried out in
the computer in the command sequences editor. No modification to the PLC code is necessary when a
change is made to a command sequence.

PRINCIPLE STRUCTURE OF THE COMMUNICATION

 Command variable:
The command variable is the variable that is linked during project configuration in the Command
Processing module for the respective command action.
With this variable, set values are transferred to the PLC when a step is executed.
 Response variable:
This variable is used to read back values from the PLC for evaluations.

SCHEMA

The PLC communicates with the zenon Energy driver, which in turn communicates with the Command
Processing in zenon Runtime. The Command Processing forwards the values to the command sequences
editor, where they are processed. Whilst executing a command sequence, the command sequences
editor works synchronously to zenon Runtime in a cycle of 100 ms.

6
Introduction

3.1 Command Processing - supported action types

In order to be able to use engineered of the Command Processing in the Command Sequencer module,
at least one action must be configured in the Command Processing module.

The following action types of Command Processing are supported in the Command Sequencer module:
 Command
 Forced command
 Direct set value input
 The set value configured in the Command Processing can be transferred to the Command
Sequencer module.

 Direct status input


 Replace
 Revision
 Direct correction
 Block
 Release
 Check response value
 Lock

Information
You can find further information in the Energy Edition manual in the Action types
chapter.

3.2 Variables for command sequences

When compiling the Command Processing, the data model for the Command Sequencer module is also
created.

This is created as follows:


 An item of switchgear is created for each response variable, which gets the variable name or
variable identification of the response variable as a name.
The response variable is assigned to the created switching device. Return TAG is used as a type.
Data type is: Numerical.

7
Introduction

The naming of the switching device can be configured in the Command Sequencer project
property in the Display name in the command sequence grid property.
 A step is created for each action that is configured in the Command Processing module and for
which a response variable is also available. The step is given the name of the action that is
displayed in the Command Processing tree.
 The response variable is linked to each step created as a parameter. These parameters are, for
example, significant when creating transitions (on page 70).

DISPLAY NAME IN THE COMMAND SEQUENCE GRID

The text display of a variable in Runtime is configured in the Command Sequencer project property group
in the Display name in the command sequence grid property.

Depending on the configuration, the variable is displayed in the command sequence grid accordingly
when shown in Runtime.

Possible display names:


 Variable name
 Variable identification
 symbolic address

VALIDATION:

A check is carried out when compiling the Runtime files in the zenon Editor.

In doing so, a check is made to see if the naming of the created switching device is unique. If this is not
unique, an error message is issued in the output window of the Editor. No objects that are available for
the command sequences are created for the response variable.

ERROR MESSAGES:

'<VariablenameX>' variable ignored for the command sequence data model, because
the '<VariablennameY>' variable has already created an entry '<Naming in Command
Sequences>'! Possible cause: not a unique ID or symbolic address.

A check is also carried out to see whether the variable can provide an invalid object name for the
command sequence object.
'<Variablename>' variable ignored for the command sequence data model because this
gives and invalid '<command sequence object name' object name!
Possible Reason: empty Identification or empty symbolic Address.

8
Introduction

3.2.1 Examples of views: Display name in the command sequence grid

Examples of views for possible configurations of the variable names.

DISPLAY NAME IN THE COMMAND SEQUENCE GRI D

VARIABLE NAME

VARIABLE IDENTIFICAT ION

SYMBOLIC ADDRESS

3.3 Display of the action name in Runtime:

The text display of a Command Processing action in the Runtime is configured in the project property
group Command Sequencer in the Step name in the command sequence grid property.

Depending on the configuration, the step is displayed in the command sequence grid accordingly when
shown in Runtime.

Possible display names:


 Standard text
Format: Action name: RV[DIR]
 Action name
Name of the Command Processing action as configured in the Action name command processing
property.

9
Terminology

VALIDATION:

A check is carried out when compiling the Runtime files in the zenon Editor.

In doing so, a check is made to see if the naming of the action created is unique. If this is not unique and
there are two actions with the same name, an error message is given in the output window of the
Editor:
The step '%s' for the switchgear '%s' will be ignored for the command sequence
model because the action name is not unique.

Attention

This error message means that the second step with the same name is not available
in Runtime for the command sequences.

4. Terminology
The following terms are used in the Command Sequencer module:

10
Terminology

Parameter Description
Switchgear Physically available element, for example: Switch or
disconnector.
Command sequences editor Part of the Command Sequencer module to control the
process of Command Processing. The command
sequences editor carries out a command sequence in
execution mode. The complete process of the command
sequence can be configured in the command sequence
and the command sequences can be administered in the
editing mode.
Command sequence Command Processing steps are compiled and saved in
command sequences. These steps are then transferred to
the controller by the control system.
Begin parallel branch Element that ensures the breakdown of the command
sequence process into two or more branches.
Transition Element of the Command Sequencer module that
contains a condition. The element is used after a step to
ensure a defined transition from one step to the next.
Step Execution of an action from the Command Processing,
such as: Switching command: OFF.
End parallel branch Element that combines the separation of the command
sequence process into two or more branches back into
one branch.
Branch Area of the Command Sequencer module that allows
separation into two or more branches, of which only one
branch can be active during the process. It is an either/or
branch. A branch always starts with the Begin branch
and ends with the End branch element.
Assignment of switching device Element of the Command Sequencer module that
instigates the assignment of a switching device in
Runtime:
 With this element, several (or all) response
variables can be reserved (assigned) in
advance. The NET_SEL status bit is set for
this reservation.
 Unlocking is also carried out using a
switchgear assignment element.
 After the command sequence process, all
NET_SEL status bits are automatically
deleted again.

You can find further information on the status bit in


the Status processing manual in the Select in the

11
Procedure

network (NET_SEL) section.


Branch An execution area in the Command Sequencer
module. Steps, transitions and jump targets can be placed
on it.
End of element Element of the Command Sequencer module. This end
element is mandatory in order to conclude the
configuration of a command sequence correctly.
Jump target Element of the Command Sequencer module that
allows a direct jump to a defined location of a branch.
Teaching cursor Graphic element of the Command Sequencer module.
Visualizes position in the command sequence grid in
which the element to be recorded is placed during the
teaching process.
Command sequence grid The workspace in the command Sequence editor in the
Command Sequencer module. Actions in Runtime can
be compiled into command sequences in graphic form
here.
the diagram is divided into a grid shape, whereby each
grid offers space for an element.
Project simulation Runtime mode in which processes - triggered by the
productive process - run as a simulation.
In doing so, it is not just one individual driver that is
switched to simulation mode, but the complete project.
Depending on the settings, all Runtime data is also copied
to a simulation image, so that command sequences can
also be recorded and analyzed in simulation mode.
Simulation mode In contrast to hardware mode, there is no communication
with the controller. The variable values are calculated
using the set simulation type (static, counting or
programmed).
Simulation image Memory area in which all values of the simulation are
stored.

5. Procedure
Configuration and use of the Command Sequencer module takes place in three main steps:
1. Configuration of the command processing in the zenon Editor.
2. Creation of the command sequences in the command sequences editor (on page 36) in Runtime.
3. Execution of the command sequence in Runtime.

12
Licensing

CREATION OF A COMMAN D SEQUENCE

The user creates a command sequence in zenon Runtime. The selectable steps that correspond to the
actions of Command Processing serve as a basis for this configuration. To do this, the command
sequence in Runtime must be in edit mode.

EXECUTION OF A COMMAND SEQUENCE

The user executes the command sequence in Runtime. To do this, they first change the command
sequence mode to test mode. The command sequence is then started.

The user can no longer alter command sequences in execution mode. The command sequence must be
switched to edit mode again in order to edit it.

6. Licensing
The Command Sequencer module offers you the possibility to create, execute and configure processes
of the module Command Processing in a graphic flow chart.

The module can only be licensed in addition to the Energy Edition.

License information
Must be licensed for Editor and Runtime (single-user, Server, Standby and Client).

If both the Batch Control module and the Command Sequencer module, which both require a license,
are licensed at the same time, selection of the module used is carried out by means of the project
setting.

To select the preferred module in Runtime:


 Click on the node of your project in the Editor.
 Go to the Runtime settings project properties group.
 Select, for License module in Runtime of the Preferred module property, Command
Sequencer(default) or Batch Control.

The selected model is then available in Runtime for further project configuration.

13
Engineering in the Editor

PROJECT SIMULATION

The Project Simulation module, which requires a license, is included with the Command Sequencer
module.

7. Engineering in the Editor


To be able to use the Command Sequencer module in Runtime, you must first do the following in the
zenon Editor:
 Configure Command Processing.
 Configure variables (on page 7).
 Create a Command Sequencer screen (on page 14).
 In the Command Sequencerscreen, add the Command sequences editor control element.
 Create a screen switch function (on page 27) for the Command Sequencer screen

If the configuration in zenon Editor changes, this is applied by compiling the Runtime files and reloading
them in zenon in the Command Sequencer module.

7.1 Create a command sequence screen

CREATE A COMMAND SEQUENCE SCREEN

ENGINEERING

Steps to create the screen:


1. Create a new screen:
In the tool bar or the context menu of the Screensnode, select the New screen command.
An empty Standard screen is created.
2. Change the properties of the screen:
a) Name the screen in the Name property.
b) Select Command Sequencer in the Screen type property.
c) Select the desired frame in the Frame property.
3. Configure the content of the screen:
a) select menu item Control elements from the menu bar

14
Engineering in the Editor

b) Select Insert template in the drop-down list.


The dialog to select pre-defined layouts is opened. Certain control elements are inserted into
the screen at predefined positions.
c) Remove elements that are not required from the screen.
d) If necessary, select additional elements in the Elements drop-down list. Place these at the
desired position in the screen.
4. Create a screen switch function.

7.2 zenon functions

The following functions are available for the Command Sequencer module:
 Execute command sequence or mode change (on page 15):
sends control commands to Command Sequencer execution
 Export comannd sequence (on page 19):
exports command sequences as an XML file. Content of the XML files can be filtered.
 Import command sequences (on page 22)
This function imports command sequences from a XML file.
 Teach command sequences (on page 25)
Starts or stops teaching mode.

7.2.1 Execute command sequence or mode change

You can send control commands to the Command Sequencer execution with this function.

To create the function:


1. In the zenon Editor, navigate to the Functions node
2. Select New function
3. Go to the Command Sequencer in the function selections
4. select Execute command sequences command/mode switching.

15
Engineering in the Editor

5. the dialog for configuring functions is opened

16
Engineering in the Editor

ACTION

Parameter Description
Action Selection of the action to be executed:
 Command
 Mode
Command Selection of the command to be executed from
drop-down list:
 Ignore
Does not execute a command sequence command
(Start or Cancel).
If automatic or semi-automatic is configured
under mode, only one mode switch is executed.
 Start command sequence
Starts identified command sequence(s)
 Cancel command sequence
Cancels identified command sequence(s)
Mode Selection of the mode in which the command sequence is
to be executed: Selection of the mode from a drop-down
list:
 Ignore
The command sequence(s) identified by the function
is executed in the existing mode of the command
sequence.
 Automatic
The command sequence(s) identified by the function
is executed in Automatic mode.
 Semi-automatic
The command sequence(s) identified by the function
is executed in Semi-automatic mode.

COMMAND SEQUENCE FIL TER

Parameter Description
Command sequence filter Configuration of the command sequence filter. This
determines the command sequences on which the
function is to be applied.
Name is case sensitive When filtering for command sequence commands,
capital letters and small letters in the command
sequence name are taken into account.

Default: Inactive

17
Engineering in the Editor

Command sequence Parameters for the selection of the command sequence.


Select from drop-down list:
 Name with wildcards:
A name with placeholder can be entered
into the input field. Filtering is carried out
according to this name.
Wildcards are:
*: any desired number of any characters *
can be entered at the start, at the end or
and the start and end in the input field.
The input field is only active with this
option.
 Name from variable:
The name of the command sequence is taken from a
variable in Runtime.
Click on button ... opens the dialog for selecting
variables.
 ID from variable:
The ID of the command sequence is taken on by the
ID from a variable.
Click on the ... button opens the dialog for selecting
variables.

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Help Opens online help.

Information
You can find detailed information for the configuration of the function in the
configuration of the command sequence filter chapter.

ERROR DIALOG

18
Engineering in the Editor

If, for Command and Mode, the Ignore property is configured for each, the function will not have an
effect in Runtime. An error message is shown in this case.

7.2.2 Export command sequences

You export configured command sequences to an XML file using this function. The content of the export
can be filtered.

To create the function:


1. In the zenon Editor, navigate to the Functions node.
2. Select New function.
3. Go to the Command Sequencer in the function selections.
4. Select Export command sequences
5. The dialog for configuring functions is opened.

19
Engineering in the Editor

COMMAND SEQUENCE FIL TER

Parameter Description
Command sequence name is case When selecting the command sequences to be
sensitive
exported, the capitalization of the command
sequence name is taken into account.
Command sequence  Name with wildcards
Selection of the command sequences to be
exported with the command sequence
names. Entry of the search term in the input
field.
The following are wildcards:
*: any desired number of any characters *
can be entered at the start, at the end or
and the start and end in the input field.
The input field is only active with this
option.
 Name from variable
The name of the command sequences to be
exported are taken from a variable in Runtime.
Click on ... to open the dialog to select a variable.
 ID from variable
The ID of the command sequences to be exported
are taken by the ID from a variable.
Click on ... to open the dialog to select a variable.
Status command sequence Selection of the status of the command sequences to be
exported:
 All
All command sequences are exported.
 Edit mode
Only command sequences that are currently in
edit mode are exported.
 Execution mode
Only command sequences that are currently in
execution mode are exported.

OUTPUT FILE

Parameter Description
Naming Drop-down list to select how the output file is named:
 File name:
Name of the target file can be freely defined. Input
of the file name in the input field

20
Engineering in the Editor

 File name from variable:


Name of target file is taken from a configured
variable.
Click on ... to open the dialog to select a variable.
 File name from command sequence name
Name of the target file is named the same as the
command sequence name to be exported
 File name from command sequence ID
File is named with the command sequence
ID.
Overwrite existing file Defines behavior if there is already an export file. If
the checkbox is activated, the existing file is
automatically overwritten (without another request
for confirmation).

Default: active
Show this dialog in the Runtime Active: This dialog is opened in Runtime before the
function is executed.

Default: Inactive

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Help Opens online help.

ERROR DIALOG

A warning dialog appears in the event of an incorrect configuration of the export function:
 The search value for command sequence is empty:
No command sequence for export could be found. Check the project configuration in the
command sequence filter area.
 The value for the naming of the target file is empty:
No command sequence for export could be found. Check the project configuration in the output
file area.

21
Engineering in the Editor

The screenshot shows both possible causes of errors. Only one of the errors given can be displayed
depending on the error.

Parameter Description
Yes The dialog of the function is closed.
The dialog to configure the function is also closed.
No The warning dialog is closed.
The dialog to configure the function remains open for
configuration of the function again.

Information
You can get further information on the structure of the XML file in the Structure of the XML
file for command sequences (on page 119) chapter.

7.2.3 Import command sequences

You import command sequences from an XML file using the function.

To create the function:


1. In the zenon Editor, navigate to the Functions node.
2. Select New function.
3. Go to the Command Sequencer in the function selections.
4. Select Import command sequences.

22
Engineering in the Editor

5. The dialog for configuring functions is opened.

Information

Existing command sequences are only overwritten on import if they are in the
command sequences editor.

More precise information on import can also be visualized using the two system
driver variables [command sequences] import event numerical and -[command
sequences] import event string.

IMPORT SOURCE

Selection of the import source for the import of a command sequence:


 File name
 From variable

23
Engineering in the Editor

Parameter Description
File name Selection of the XML import file. Clicking on ... opens
the dialog to select the file.
From variable The name of the import file is taken from the selected
variable.
Click on ... to open the dialog to select the variable.

IMPORT OPTIONS

Parameter Description
Action for name conflicts in command Behavior in the event of naming conflicts:
sequences
 Create new command sequence
A new command sequence is created.
Naming of the new command sequence:
[command sequence name from XML file]
+ [serial number].
 Overwrite old command sequence
Existing command sequence is overwritten/replaced
with content from XML import.
 Skip
No import is carried out for command sequences
that already exist.

Show this dialog in the Runtime Active: This dialog is opened in Runtime before the
function is executed.
Default: Inactive

24
Engineering in the Editor

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Help Opens online help.

ERROR DIALOG

A warning dialog appears in the event of an incorrect configuration of the import function:
 The search value for file name of the data source is empty:
No command sequence for import could be found. Check the project configuration in the
command sequence filter area.

Parameter Description
Yes The dialog of the function is closed.
The dialog to configure the function is also closed.
No The warning dialog is closed.
The dialog to configure the function remains open for
configuration of the function again.

Information
You can get further information on the structure of the XML file in the Structure of the XML
file for command sequences (on page 119) chapter.

7.2.4 Teach command sequences

Start or stop the teaching process in Runtime using this button.


This function is particularly suitable for starting teaching in Runtime in a process screen, without having
to switch to the command sequences editor.

To create the function:

25
Engineering in the Editor

1. In the zenon Editor, navigate to the Functions node.


2. Select New function.
3. Go to the Command Sequencer in the function selections.
4. Select Teach command sequences
5. The dialog for configuring functions is opened.

Parameter Description
Start teaching Starts a new teaching process.

In doing so, a new command sequence with a


standard name is created. The teaching cursor is
initially positioned in this command sequence in the
command sequence grid under the start element.

Runtime must be in simulation mode for this!

You can find further information in the Teaching (on


page 101) chapter.
Stop teaching Ends teaching.
Show this dialog in the Runtime Active: This dialog is opened in Runtime before the
function is executed.
Start teaching or Stop teaching can be
selected in Runtime.

Default: Inactive

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Help Opens online help.

26
Engineering in the Editor

7.3 Command sequence screen switching

To use command sequences in Runtime, configure a screen switch function to a Command Sequencer
screen:
1. Select the New function command in the Functions node.
2. select the Screen switching function.
3. Select the Command Sequencer screen.

Link the function with a button on the screen in order to be able to switch in Runtime.

Information

The configuration of the Command processing module serves as a basis for operation
in the Command Sequencer screen.

7.4 Command Processing actions in the Command Sequencer


module

In this chapter, you are provided with additional information on the behavior of configured Command
Processing actions in the Command Sequencer module.

7.4.1 Behavior of "Check response value" action type

The "Check response value" action type is used with command sequences in particular to check the value
of the response variable.

To be able to use the "Check response value" action type in the Command Sequencer module, this action
type must be configured as an action in a command group in the Command Processing module in the
zenon Editor.

27
Engineering in the Editor

Attention

This action type is not used in principle in the Command Processing. It was specially
conceived for use in the Command Sequencer module.

For Command Processing, it is possible to configure this query using action buttons
and to receive responses in Runtime.

The Check response value action type is to check variables for the status ON or OFF.

Whilst the Check response value action is executed, the standard key Cancel is unlocked in the
Command Processing screen.

In doing so - depending on the setting of the runtime monitoring - there is a wait until the value of the
response variable corresponds to the value of the checking direction - switching direction action
property. If the checking value is EIN, this is the value 1; it is the value 0 for OFF.

If no runtime monitoring has been configured (runtime monitoring= "none"), the set waiting time (~24
hours) is the maximum time that is waited. Otherwise the action is ended and the TIMEOUT status bit
is set for the response variable.

If, after execution of the action in the Command Processing screen, the other actions are not available,
this is for the following reasons:
 The timeout for runtime monitoring has not yet expired.
 The response variable does not yet have the expected value (the value change has not yet been
received).
 The action has not yet been canceled with the Cancel button.

Information
The Check response value action only serves to read the value of the response variable
without executing an activity.
The action is intended for use in the Command Sequencer module.

If the response variable already has the value of the switching direction, the execution of the action is
recognized as completed. The other buttons in the Command Processing screen are thus immediately
available.

If the response variable is set to OFF or Revision , the response value can nevertheless be
checked.

28
Engineering in the Editor

7.4.2 Setpoint input for a Command Processing action

If a setpoint input action is configured in the Command Processing module, a set value of the Command
Processing can be transferred in both the Command Processing module and the Command Sequencer
module.

WRITE SET VALUE WITH INPUT

Procedure for a setpoint entry with manual entry of value in the Command Sequencer module:
 When processing a command sequence, the Command Processing screen is opened during the
Write set value with input step: The value of the command variables element is available and filled
with the current value. The Execute button is active. Action buttons are not active.
 The scroll bar is available and filled with the current value.
 The value is accepted after clicking on Execute.
 The execution of the switching sequences is continued with the new value.

WRITE SETPOINT VALUE WITH GIVEN VALUE

This value is configured in the Command Processing module in the Action settings property with the Set
value property. If a value is to be proposed in Runtime, the Return state/switching direction property in
the zenon Editor must be configured for the Command Processing action with DIR. In this case, a value
is prescribed in the Editor in the Set value property.

TWO-STAGE EXECUTION

 The value is written after successful confirmation with two-stage execution and a check of the
interlockings.
 The old value is still visible in the grayed-out input field whilst there is a wait for the confirmation
or unlocking.

Information
The Command Processing action Write set value with entry of the value is only possible
from zenon 7.50.

Information

You can find further information in the Energy Editionmanual, in the Command
Processing and Actiontype "Write set value" chapters.

29
System driver variables for the Command Sequencer module

7.4.3 Skip action for identical set value and actual value

If the Skip action for identical set value and actual value property in the zenon Editor has been activated,
the values of the response variable are checked with the setpoint input during the process of the
command sequence in Runtime.

The step is skipped if both values are identical. This is also shown accordingly in the tooltip (on page 95)
of the step (= skip).

8. System driver variables for the Command Sequencer


module
The following system driver variables are available for this subject area:

This group is only visible with a valid license for the Command sequences module.

30
System driver variables for the Command Sequencer module

Name Data Type Comment


[Command Sequencer] DINT Number of command sequences with pending user interaction
Number of pending user that are currently running.
interactions
If the operation has been executed or the command sequence
has been completed, the numeric value is reduced by 1.
If several steps are waiting for an operation in a command
sequence, the numeric variable is incremented for each step.
[Command Sequencer] DINT Number of command sequences currently running.
Number of running
The system variable is updated both at the start and end of a
command sequences
command sequence.
[Command Sequencer] DINT Result of the XML export:
Export result numeric
 -1:
is being executed
 0:
Initialization value read successfully
 from 1:
Number of errors that occurred
[Command Sequencer] STRING Result of the XML export as a text.
Export result string
 No errors occurred.
 XML export error: The export file [save
location]\[File Name] already exists
and must not be overwritten.
Only occurs if the Overwrite existing file
property is not active in the export dialog and
there is already a file with the same name in the
export folder.
[Command Sequencer] STRING Detailed content of the XML export.
Export result XML
This variable visualizes the content of the XML export.
The following are displayed:
 Name
 Version
 Type
 ID

If the content exceeds the maximum length of the


system driver variable, the result is shortened.
[Command Sequencer] DINT Result of the XML import:
Import result numeric
 -1:
is being executed

31
System driver variables for the Command Sequencer module

 0:
Initialization value read successfully
 from 1:
Number of errors that occurred

32
System driver variables for the Command Sequencer module

[Command Sequencer] STRING Result of the XML import as a text:


Import result string
 The command sequence was not found. The
command sequence therefore cannot be
imported.
 The command sequence could not be
overwritten due to an incorrect status.
 The command sequence cannot be imported
as a new version. The versioning is not
active.
 The command sequence could not be
imported. It does not match the selected
type.
 The command sequence could not be
imported because the name is not
permissible.
[Command Sequencer] STRING Detailed content of the XML import.
Import result XML
This variable visualizes the content of the XML export.
The following are displayed:
 Name
 Version
 Type
 ID

If the content exceeds the maximum length of the


system driver variable, the result is shortened.
[Command Sequencer] STRING Name of the command sequence that is currently being
Name of the active
taught. The command sequence names are used once the
teached command
sequence
teaching process has been started.

If a teaching process has been completed, the value of


this variable switches to empty.
[Command Sequencer] STRING Names of the command sequences currently running:
Names of the running With several command sequences, the command sequence
command sequences names are separated by a semicolon (;).
[Command Sequencer] STRING Names of command sequences running with user interactions
Names of command pending.
sequences with pending
If several steps are waiting for an operation in a command
user interaction
sequence, the command sequence name is only entered once
and is retained until all steps have been executed.
With several command sequences, the command sequence
names are separated by a semicolon (;).
[Command Sequencer] DINT Status for the teaching process. Shows whether teaching

33
Project backup for command sequences

Teaching status is currently active or not active.


 0 - Teaching is not active.
 1 - Teaching cursor waits for positioning
(this status is active until the teaching cursor in
the command sequences editor has been placed)
 2 - Teaching is active.

This variable has the value 2 in the event of an ongoing


teaching process.

If a teaching process has been completed, the value of


this variable switches to 0.

Information

If a computer in redundancy operation upgrades to become the server, it sets the


value of the system driver variables to 0 (numerical variables) or empty string
(string variables).

Information

You can find out further information in the system driver manual.

9. Project backup for command sequences


A project backup in the zenon Editor does not take into account the command sequences configured in
Runtime.

Back up the corresponding Runtime files manually.

BACKING UP THE COMMA ND SEQUENCE RUNTIME FILES

To back up the Runtime files of configured command sequences:


1. Switch to the folder of the Runtime files.
C:\Users\Public\Documents\zenon_Projects\[Workspacename]\[Projekt
name]

This folder is only available if the project has been compiled at least once in zenon .

34
Function authorizations

Highlight the desired project in the zenon Editor and press the keyboard shortcut Ctrl +
Alt + R to go directly to the Runtime folder.
2. Copy the Sequences folder.
3. Add the Sequences folder to the Runtime folder of the project backup again.
Runtime should be closed during the copy process or restarted again after copying.

10. Function authorizations


From zenon version 7.50, function authorizations are also supported by the Command Sequencer
module.

They are configured in the User administration module. In doing so, a distinction is made between
Editor authorizations and Runtime authorizations.
There are separate Runtime function authorizations available for the Command Sequencer module:
 Function authorizations for XML import and export
 Function authorizations to control the process of a command sequence

Information
You can find further information on the configuration of function authorizations in the
User administration manual.
You can find the special function authorizations for the Command Sequencer module
in the Runtime function authorizations chapter.

Attention
Configurations of the Command Processing module always have priority over
configured function authorizations for the Command Sequencer module during
execution.
This ensures that there is no blockade during the course of a command sequence.

11. Command sequences in Runtime


All administration, creation and processing of command sequences is carried out in Runtime. Editing in
the zenon Editor is not possible.

35
Command sequences in Runtime

SAVING OF COMMAND SE QUENCES WHEN CLOSING RUNTIME

If Runtime is closed and there are still command sequences that have not been saved, you are asked if
these command sequences are to be saved. In order for this query to not prevent Runtime closing,
Runtime is automatically closed after 15 seconds if nothing is entered. Unsaved command sequences
are then discarded.

 Clicking on the Yes button saves all changes for all command sequences open in the command
sequences editor. Runtime is then closed.
 Clicking on the No button closes Runtime without saving changes to the command sequences.

11.1 Command sequences editor

The command sequences editor is the graphical user interface for the configuration of command
sequences in Runtime.

The following are available for the command sequences editor:


 Toolbars
The design of the toolbars depends on the command sequences editor mode (on page 60).
 Tabs
 Command sequence grid (on page 55)
project configuration area

36
Command sequences in Runtime

 Dockable windows

Parameter Description
Header of the editor Information about:
 Current command sequence
 Mode
Command sequences editor Menu bar (on page 62) with symbols to configure a
command sequence.

Tabs with opened command sequences Select the open command sequences by clicking on the
respective tab.
In execution mode, the color of the tab corresponds to
the color of the execution status (on page 96) of the
command sequence.

37
Command sequences in Runtime

Command sequence grid Diagram of the project configuration.


Configuration by dragging & dropping the elements from
the menu bar.
To enlarge or reduce the grid, position the mouse
pointer at the edge and drag it in the desired direction
with the mouse button held down.
Mode display Status display of the selected mode:
 Edit mode:
 Symbol for editing mode (pencil)
 Size of the command sequence grid
 Number of configured elements
 Execution mode:
 Symbol for execution mode:
- Automatic
- Manual
 Symbol for the status
(green thumb: ready to start)
 Execution step:
- in execution
- completed
Cursor position Shows line and column of the selected choice in the
command sequence grid.
Zoom bar Setting of the zoom factor for the command sequence
grid with slider.
+ Enlarges the zoom factor by 25% per click.
- Reduces the zoom factor by 25% per click.
Selection of the dockable windows Opens drop-down list to select the dockable windows:
 List of command sequences (on page 40)
Selected dockable windows are shown or hidden.

11.1.1 Context menu - tabs with opened command sequences

If several command sequences are open in the command sequences editor, these are represented with
tabs. The tabs represent the command sequences that are open in the command sequences editor. The
configuration of the command sequence in the command sequence grid is shown by clicking on a tab.

38
Command sequences in Runtime

TAB CONTEXT MENU

Parameter Description
Save Saves the current command sequence
Close Closes the current command sequence
Close all others Closes all open tabs/command sequences with the
exception of the one that is currently selected.
Group horizontally Shows all open tabs in a new view.
The view opens in a new window under the current view:
 Move view
Opens the tab in a new window.
 Open view at the same time
Opens the selected tab in a new window and
leaves it in the list of tabs.
Group vertically Shows all open tabs in a new view.
The view opens in a new window next to the current
view:
 Move view
Opens the tab in a new window.
 Open view at the same time
Opens the selected tab in a new window and
leaves it in the list of tabs.

Command sequences can be displayed and opened in two groups next to each other or underneath
each other. To open a command sequence in a new group:
1. Select, in the context menu of the command sequence, the Group horizontally or Group
vertically command

 Select the type of display:


 Move display
 Open display at the same time

The control elements are always only applicable to the active command sequence of the active group.
 The active group is emphasized in color.
 The active tab is emphasized with bold font. Information on the active tab is shown in the title
bar of the editor.
 Tabs can be moved and arranged by dragging & dropping, including between groups.
Use this possibility of moving to return to the view with one group when two groups are
open.

39
Command sequences in Runtime

11.1.2 Dockable windows - list of command sequences

The list of command sequences lists all configured command sequences. Command sequences that have
already been configured are edited and administered in the list of command sequences and new
command sequences are created.

LIST OF COMMAND SEQUENCES - OVERVIEW:

The following is possible in the list of command sequences:


 New command sequences can be created.
 Command sequences that have already been configured in the command sequences editor are
loaded for further editing.
 Command sequences are renamed.
 Command sequences are duplicated.
 Command sequences are deleted.
 Command sequences are switched to execution mode.
 Command sequences are switched to edit mode.
 Columns are selected and formatted.

The columns of the list for command sequences can be sorted and filtered. The columns can be
moved by means of drag&drop. Columns can be shown and hidden with the context menu (right mouse
click).

40
Command sequences in Runtime

Selection and positioning

POSITIONING AIDS

When moving windows from the Editor interface, positioning aids are displayed. These represent
windows or their borders.

This element represents a window area in the Editor.

This element represents the border area of the Editor.

POSITION WINDOW

To position an element as docked:


1. Move the element with the mouse into the desired area
2. The positioning aid is displayed
3. This represents a window and its areas:
a) Center: whole window
b) Top: upper half
c) Bottom: lower half
d) Right: right half
e) Left: left half
or the border of the Editor
4. Move the mouse to the central positioning aid or to a positioning aid on the border of the editor
and from there to the desired area
5. The area in the Editor where the element was placed when the mouse button was released is
colored in blue
6. Move the mouse within the positioning aid to the desired area that is displayed in blue
7. Let the mouse button go and the element is placed

If a window is placed on a pre-existing window, both windows are displayed at the same location using
tabs.

41
Command sequences in Runtime

Toolbar - list of command sequences

42
Command sequences in Runtime

Parameter Description
New command sequence Creates new empty command sequence.
Open command sequence in Editor Opens the selected command sequence in the command
sequences editor.
Not active if no command sequence is selected.

Rename command sequence Opens dialog to create a new command sequence or


rename a command sequence.
Not active if no command sequence is selected.
Not active if the selected command sequence is in
execution mode.
Duplicate command sequence Duplicates selected command sequence and opens dialog
to create a new command sequence.
Not active if no command sequence is selected.
duplicated command sequence is automatically
created in edit mode. When duplicating command
sequences, the existing name is supplemented with the
prefix "Copy of". If the maximum length is exceeded by
this, the name is shortened to the allowed length starting
from the last character.
Delete command sequence Deletes selected command sequence(s). Multiple
selection is possible.
A command sequence that is executed cannot be deleted.
An information dialog opens in this case.
Not active if no command sequence is selected.
Before final deletion, an dialog appears requesting
confirmation of whether the selected command
sequence(s) are really to be deleted for good.
Export selected as XML... Exports selected command sequences as an XML file.
Multiple selection is possible.
Not active if no command sequence is selected.
You can find further information in the Export command
sequence(s) as XML file (on page 46) chapter.
Import XML Imports command sequence(s) from an XML file.
You can find further information about this in the Import
command sequence(s) from XML file (on page 48)
chapter.
not active if the user does not have the
corresponding function authorization.
The Command Sequences function authorization:

43
Command sequences in Runtime

Import command sequences is applicable for both


XML import and for the import of simulation images.
Import command sequence from Imports command sequence from existing simulation
simulation image images.
You can find further information on this in the import
command sequence(s) from simulation image (on page
51) chapter.
not active if the project is running in simulation
mode or if the user does not have the corresponding
function authorization.
The Command Sequences function authorization:
Import command sequences is applicable for both
XML import and for the import of simulation images.
Switch command sequence to execution Switches selected command sequence(s) to execution
mode mode (on page 92).
A validation of the configured command sequence is
carried out automatically. Execution mode only starts if
the command sequence has been configured without
errors.
Otherwise a notice dialog appears informing you that the
command sequence is invalid. The command sequence
cannot be started.
Not active if no command sequence is selected.

Switch command sequence to edit mode. Switches a command sequence that is currently running
in execution mode back into edit mode (on page 62) in
order to make changes.
Not active if no command sequence is selected.

Column selection Opens a dialog (on page 44) to select columns that are to
be displayed.
Column formats Opens dialog (on page 46) for the configuration of text
and background colors for the display of columns in the
list view.

Column selection

44
Command sequences in Runtime

Options Function
Available columns List of columns that can be displayed in the table.
Selected columns Columns that are displayed in the table.
Add -> Moves the selected column from the available ones to the
selected items. After you confirm the dialog with OK, they are
shown in the detail view.
Add all -> Moves all available columns to the selected columns.
<- Remove Removes the marked columns from the selected items and shows
them in the list of available columns. After you confirm the dialog
with OK, they are removed from the detail view.

<- Remove all All columns are removed from the list of the selected columns.

Up Moves the selected entry upward. This function is only available


for unique entries, multiple selection is not possible.

Down Moves the selected entry downward. This function is only


available for unique entries, multiple selection is not possible.

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Help Opens online help.

45
Command sequences in Runtime

Column format

Parameter Description
Available columns List of the available columns via Column selection. The column selected
here is configured using the settings in the Parameters section.
Parameter Settings for selected column.
Labeling Name for column title. The column title is online language switchable. To do
this, you must enter the @ character in front of the name.
Width Width of the column in characters.
Alignment Alignment.
Possible settings:
 Left: Text is justified on the left edge of the column.
 Centered: Text is displayed centered in the column.
 Right: Text is justified on the right edge of the column.
OK Applies settings and closes the dialog.
Cancel Discards settings and closes the dialog.

Exporting the command sequence(s) as an XML file

You export selected command sequences as an XML file with the Export selected XML button. To do
this, select the desired command sequences from the list of configured command sequences (multiple
selection is possible). With multiple selection, only one XML file is saved for all selected command
sequences.

46
Command sequences in Runtime

NOTE DIALOG: EXPORT COMMAND SEQUENCE

Before export, a check is carried out to see if there are unsaved changes in a command sequence
configuration.

Hint
Command sequences with unsaved changes are visualized in the tab of the command
sequences editor with a * before the command sequence name.

47
Command sequences in Runtime

Parameter Description
[Name of the command sequence] Name of the command sequence that still has unsaved
changes.
It is always only the current command sequence name that
is displayed. After clicking on the Yes or No button, the
next command sequence with unsaved changes is
displayed.
Yes The current command sequence is saved before the save
process. The save dialog is then opened.
No Exports the displayed command sequence with the
last-saved project configuration status. The save dialog is
opened directly.
Yes all All open command sequences with unsaved changes are
saved before the save process. The save dialog is then
opened.
not active if only one command sequence was
selected for export.
No all Exports all selected command sequences with the
last-saved project configuration status. The save dialog is
opened directly.
not active if only one command sequence was
selected for export.

Information
You can get further information on the structure of the XML file in the Structure of the XML
file for command sequences (on page 119) chapter.

Import command sequence(s) from an XML file

The Import XML button opens the dialog to import command sequences from an XML file in the list of
command sequences.

Once the corresponding XML file has been selected, the import checks whether already-configured
command sequences conflict with the command sequences of the XML file. In this case, the Import
options dialog opens.

Information
Existing command sequences are only overwritten on import if they are in the command
sequences editor.

48
Command sequences in Runtime

49
Command sequences in Runtime

Parameter Description
[Name of the command sequence] Name of the command sequence to be imported, which is
already present in the List of command sequences.
The first command sequence name is shown. After clicking
on the Skip or OK button, the next command sequence is
displayed with a naming conflict.
[Action in the event of naming Selection of the action for the import of a command
conflicts] sequence in the event of already-configured command
sequences in the Runtime project configuration having the
same name:
 Create a new command sequence
Creates a new command sequence in the
Runtime configuration for the command
sequence of the XML file.
This imported command sequence is added
when a new serial number is given:
[command sequence name] [serial
number]
 Overwrite the existing command
sequence
Overwrites the existing command sequence
in Runtime with the content of the XML file.
Grayed out if the file to be overwritten
in the command sequences editor is in
execution mode.

Default: create a new command sequence


Carry out this action for all further conflicts Carries out the import for all subsequent command
(number of conflicts) sequences with naming conflicts with the action selected
in [action in the event of naming conflicts].
The number in quotes states how many naming conflicts
occur in the current import.
There is no step-by-step display of the command
sequences.
Default: Inactive
Number of command sequences to be Total number of command sequences for the import.
imported from the XML file: The number gives the total number of command
sequences in the XML file, not just the number of conflicts.
Skip Skips the import for the displayed command sequence.
Switches to the next command sequence with conflicts in
the event of several naming conflicts.
If the Execute this action for all further conflicts
property has been activated, no command sequences with
naming conflicts are exported.

50
Command sequences in Runtime

Parameter Description
OK Carries out the import for the displayed command
sequence with the action selected with [action in the
event of naming conflicts].
Switches to the next command sequence with conflicts in
the event of several naming conflicts.
If the Execute this action for all further conflicts
property has been activated, no command sequences with
naming conflicts are exported.
Cancel Cancels the import for all subsequent command sequences
and closes the dialog.

Information
You can get further information on the structure of the XML file in the Structure of the XML
file for command sequences (on page 119) chapter.

Import command sequence(s) from simulation image

In this dialog, you arrange configured command sequences from one or more simulation images for
import into zenon Runtime.

51
Command sequences in Runtime

Parameter Description
Project simulation List of all existing project simulation images.
Only one simulation image can be selected at a time.
Command sequences in project simulation List of all configured command sequences from the
selected project simulation.
Multiple selection is possible.
Existing command sequences Pre-existing command sequences in the zenon project
that is currently running.
Add Adds selected command sequences from the Command
sequences in project simulation list to the List of
command sequences to be applied.
Only active if at least one command sequence from a
simulation image has been selected.
Overwrite Adds a command sequence from the Command
sequences in project simulation list to the List of
command sequences to be applied. This
command sequence overwrites the existing command
sequence in the command sequences editor in Runtime!
This button is only active if just one command sequence
has been selected and the selected command sequence is
already in the existing command sequences list. The
command sequence is thus already present in the
command sequences editor and is overwritten.
With multiple selection of command sequences from a
project simulation, the button is then grayed out if the
selection contains a command sequence that is not yet
present in the list of existing command sequences. A
new command sequence is created when transferring to
Runtime. This new project configuration is given a serial
number in the naming.

List of the command sequences to be Assigned command sequences that are applied in the
transferred. current Runtime environment.
 Simulation image:
Name of the simulation image from which
the command sequence comes.
 Command sequence name:
Name of the command sequence as saved in
the simulation image.
 Conflict handling:
The type of conflict handling depends on
how the respective command sequence is

52
Command sequences in Runtime

transferred to the list. Depending on the


button used (Add or Overwrite), the conflict
handling is prescribed and cannot be
changed.

List can be sorted and filtered.


Remove Removes highlighted command sequence from the List
of command sequences to be applied.
Multiple selection is possible. A new assignment from
Command sequences in project simulation is possible.
OK Closes the dialog and applies project configurations from
the list of command sequences to be applied
in the command sequences editor.
Cancel Discards all changes and closes the dialog.

If the Command Sequencer module is operated in the zenon network, the following rules are
applicable:
 If the dialog is called up, the project simulation list is filled with the simulation images from the
server.
If a server is lost, the dialog with an empty project simulation list is called up.
 The command sequences in project simulation list is also filled with data from the server on the
client. The list is empty if the server is lost.

53
Command sequences in Runtime

Toolbar - list of command sequences

Parameter Description
New command sequence Creates an empty command sequence and opens the
dialog to create a new command sequence (on page 94).
Open in command sequences editor Opens the selected command sequence in the command
sequences editor (on page 62).
Not active if no command sequence is selected.
Rename Opens dialog to create a new command sequence or
rename a command sequence.
Not active if no command sequence is selected.
Not active if the selected command sequence is in
execution mode.
Duplicate Duplicates selected command sequence and opens dialog
to create a new command sequence.
Not active if no command sequence is selected.
duplicated command sequence is automatically
created in edit mode. When duplicating command
sequences, the existing name is supplemented with the
prefix "Copy of". If the maximum length is exceeded by
this, the name is shortened to the allowed length starting
from the last character.
Delete Deletes selected command sequence(s). Multiple
selection is possible.
Not active if no command sequence is selected.
Before final deletion, an additional dialog appears
requesting confirmation of whether the selected
command sequence(s) are really to be deleted for good.
Export selected as XML... Exports selected command sequences as an XML file.
Not active if no command sequence is selected.
Import XML... Imports command sequence(s) from an XML file.
Import from project simulation... Imports command sequence from existing simulation
images.
You can find further information on this in the import
command sequence(s) from simulation image (on page
51) chapter.
not active if the project is currently running in
simulation mode or if the user does not have the
corresponding function authorization.

54
Command sequences in Runtime

Switch to execution mode Switches selected command sequence(s) to execution


mode (on page 92).
A validation of the configured command sequence is
carried out automatically. Execution mode only starts if
the command sequence has been configured without
errors.
Otherwise a notice dialog appears informing you that the
command sequence is invalid. The command sequence
cannot be started.
Not active if no command sequence is selected.

Switch to edit mode Switches a command sequence that is currently running


in execution mode back into edit mode in order to make
changes.
Not active if no command sequence is selected.

11.1.3 Command sequence grid

The command sequence grid is the workspace in the command sequences editor. Command sequences
can be created with a graphical user interface here.

The diagram is divided into grids, with each grid offering room for one element.

55
Command sequences in Runtime

TECHNICAL DETAILS

 Sheet size:
 Default: 11 x 11 cells
 Minimum: 5 x 5 cells
 Maximum: 500 x 1000 cells
 Cell size
 Default: 155 x 111 pixels
 Outside edge: 100 pixel
 Grid: is displayed by default; can also be hidden
 Scroll bar: Is displayed if the document is larger than the frame.
 Scrolling with a mouse wheel: up and down or, if you press and hold Shift, left and right.
 Zooming: Ctrl + mouse wheel
 Selecting elements: left mouse click
 Multiple selection: Ctrl + mouse click
 Move symbol: Click element and move it over the diagram while holding the left mouse button
pressed. Content can be dropped to cells with green background. If a cell turns red when you
move over it, you cannot drop the content.

AMEND SIZE OF THE GR ID

The size of the grid can be amended. To amend the size of the grid:
 Move the mouse pointer to the upper, lower or right-hand edge of the grid.
The mouse pointer changes at the edges: <=>
 Hold down the right mouse button and move the edges:
The dimensions of the grid are reduced or enlarged.

Please keep in mind:


 The minimum size of the grid is 5 x 5 cells.
 A reduction can only be carried out to a maximum of the column or line in which an element has
been placed.
This guarantees that no existing project configuration is lost.
 The size of the grid is automatically enlarged during the teaching process if necessary.
 The number of new cells in the footer is visualized in the footer during the enlargement process:

56
Command sequences in Runtime

Command sequence grid footer

The footer of the command sequence grid visualizes information for the configuration of the selected
command sequence. The elements available are different depending on the mode.

EDITING MODE VIEW

Footer of the command sequence grid in edit mode and if teaching mode has been activated:

EXECUTION MODE VIEW

Footer of the command sequence grid in execution mode:

57
Command sequences in Runtime

Parameter Description
Command sequence mode Display of the active mode:
 Edit mode
(symbol: pencil)
Only available in edit mode.
 Teaching mode
(symbol: red square)
Only available in simulation mode.
 Execution mode:
 Automatic mode
(symbol: computer terminal)
 Semi-automatic mode
(symbol: computer terminal with hand
symbol)

You can find a graphic overview with examples of


the icons in the Symbols of the footers (on page 60)
chapter.
Command sequence status of project Status of command sequence:
configuration
 Ready to start
(symbol: green hand with thumb up)
 Warning
(symbol: red hexagonal warning symbol with
exclamation mark)
Process status Graphic visualization for error-free and executable
command sequence.
 Completed
(symbol: green tick)
 Canceled
(symbol: red X)
 In progress
(symbol: green triangle)
 Idling
(symbol: red minus sign)
 Paused
(symbol: two red Is)

Only visible in execution mode.


You can find a graphic overview with examples of
the icons in the Symbols of the footers (on page 60)
chapter.

58
Command sequences in Runtime

Size of the element and number of elements Additional information on the command sequence grid:
 Total size of the working area of the
command sequence grid.
[number of horizontal cells] x
[number of vertical cells]
 Total number of positioned elements
Lines are not counted as an element.
Status of ongoing command sequence Visualizes the current status of the command sequence in
progress
 In execution
 Paused
 Aborted
Only visible in execution mode.

Current cursor position Current position of the mouse pointer in the command
sequence grid.
[cell position of horizontal cells] x
[cell position of vertical cells]
Teaching position Current position of the teaching cursor in the command
sequence grid.
only visible if teaching is in progress.
Number of selected elements Visualization of the elements selected in the command
sequence grid:
n elements selected
Only visible in editing and teaching mode.

Zoom level set Drop-down list to select the zoom level for the display of
the command sequence grid. Select the desired level in
percent from a drop-down list.
Default: 100 %
Slider for zoom Selection of zoom level for the display of the command
sequence grid.
The zoom level can be selected ether with the slider or
with the - and + buttons.
The zoom levels are identical to the drop-down list of Set
zoom level.

59
Command sequences in Runtime

Selection of the dockable windows Drop-down list for List of command sequences.

Selection of whether the window shows the List of


command sequences or is hidden.

If the list of command sequences is already shown,


this is visualized in the drop-down list with a tick.

Footer symbols

The footer of the command sequences grid uses the following symbols for visualization:

Aborted

Executed

Ready for start

In execution

Automatic mode

Edit mode

Semi-automatic mode

Idle

Paused/pause

Teaching

Warning

11.1.4 Modes

The command sequences editor has several modes:


 Edit mode (on page 62)
Command sequences are configured and edited in this mode
 Execution mode (on page 92)
Mode for execution of the configured command sequences.
The execution mode has two modes:
 Automatic mode

60
Command sequences in Runtime

 Semi-automatic mode

Command sequence - execution mode

The command sequences editor executes command sequences in Runtime. You can start any number of
command sequences. The execution mode is for testing a command sequence but also to execute this.
In addition in the execution mode changes in the Editor can be applied directly via reloading the
Runtime.

If a command sequence is currently being executed, the reloading of this command


sequence is delayed. The reloading process is only carried once the command sequence has finished,
been stopped or been canceled.

The following modes are available for execution in execution mode:


 Automatic mode (on page 61)
The configured command sequence is executed in automatic mode. The command sequence is
only stopped in the event of pending user interaction.
 Semi-automatic mode (on page 61)
There is a pause after each step in semi-automatic mode. A jump to the next step is only made
after a corresponding click Configuration can thus be tested step by step.

Information

The fundamental command sequence process cannot be changed in execution


mode. You can only change values of the command tags.

Automatic mode

A configured command sequence runs in automatic mode. This mode is also used to visualize and
control a configuration in Runtime.

If user interaction is necessary, the configured Command Processing screen is called up. The command
sequence continues after an entry is made in the Command Processing screen.

Semi-automatic mode

The configured command sequence is executed in automatic mode. The command sequence is only
stopped in the event of pending user interaction.

61
Command sequences in Runtime

Only after corresponding user interaction on the Continue command sequence at all execution
positions button or Only continue command sequence at corresponding execution positions does the
next step become active. This mode is thus suitable for stepping through a command sequence step by
step.

11.1.5 Toolbar - command sequences editor (edit mode)

In edit mode of the command sequences editor, you can easily configure a command sequence in
Runtime directly by means of drag&drop.

62
Command sequences in Runtime

Parameter Description
New command sequence Creates new command sequence.
Save command sequence Saves configured command sequence
Graphical design Calls up dialog to select the graphical design (on page 65).
The following can be selected:
 Background color
 Grid On/Off
 Grid color
 Show element IDs
Delete Deletes selected element
only active if an element was selected in the
command sequence grid.

Check command sequence for errors Checks configuration (on page 99) of a command
sequence for logical correctness and consistency.
The result is displayed in a dialog.
 No errors during this command
sequence.
 Checking the command sequence
resulted in the following
warnings/errors:
{error details}
Edit element Calls up a dialog to change the element property for
switchgear assignment (on page 74) and transition
(on page 70).

not available for step.


Replace step Opens the dialog (on page 69) to select a Command
Processing action. As a result of this, already-configured
steps can be assigned new actions.
only active if an element was selected in the
command sequence grid.
Edit mode Switches the mouse cursor from adding an element to
edit mode. The switch back to the edit mode can also be
achieved by pressing the Esc key.

Add step Occupies the mouse pointer with a step. It can be added
to any allowed, free location via click.
Opens the dialog to select a Command Processing action.

63
Command sequences in Runtime

Insert transition Occupies the mouse pointer with a transition (on page
70). It can be added to any allowed, free location via click.

Insert begin simultaneous sequence Occupies the mouse cursor with a begin parallel branch
(on page 71). It can be added to any allowed, free
location via click.
Insert end simultaneous sequence Occupies the mouse cursor with an end parallel branch
(on page 71). It can be added to any allowed, free
location via click.

Insert Begin branch Occupies the mouse cursor with a begin branch (on page
72). It can be added to any allowed, free location via click.

Insert End branch Occupies the mouse cursor with an end branch (on page
72). It can be added to any allowed, free location via click.

Insert switchgear allocation Occupies the mouse pointer with a switchgear allocation
(on page 74). It can be added to any allowed, free
location via click.

Insert jump target Occupies the mouse cursor with a jump target (on page
77). It can be added to any allowed, free location via click.

Start teaching Starts teaching mode for the currently-selected command


sequences.
Not active if:
 Teaching mode is currently running for
another command sequence.
 Project is not running in simulation mode.
Stop teaching Ends teaching mode.
Not active if teaching mode is not active.

Switch command sequence to execution Switches command sequence to execution mode (on page
mode 92).

64
Command sequences in Runtime

Graphical design

Clicking on the symbol for the Graphical design in the toolbar opens the dialog for configuring the
colors, grid settings and display of the element ID.

65
Command sequences in Runtime

Parameter Description
Background color Defines the background color of the command sequence grid. Click on the color
in order to open the palette for selecting a color.
Display grid  Active: Display the grid
 Inactive: Grid is hidden.
Grid color Defines the line color of the grid. Click on the color in order to open the palette
for selecting a color.

Show element IDs Shows or hides the element ID. This setting is to be made for each
command sequence.
Inactive: No element ID is shown in the command sequence.
This setting is recommended for normal operation.
Active: The ID of the elements is displayed in the command sequence. The
exception is lines. The display is in the upper left-hand corner of the element.
This setting is recommended for troubleshooting.
OK Applies all settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

EXAMPLES

DISPLAY IDS OF THE E LEMENTS ACTIVE

66
Command sequences in Runtime

67
Command sequences in Runtime

DISPLAY IDS OF THE E LEMENTS INACTIVE

Elements

The following elements can be used for the configuration of a command sequence in the command
sequences editor:
 Step (on page 69)
 Transition (on page 70)
 Parallel branch (on page 71)
 Branch (on page 72)
 Switchgear allocation (on page 74)
 Jump target (on page 77)
 Lines (on page 78)
 Teaching cursor (on page 77)

68
Command sequences in Runtime

START AND END ELEMENT

Each command sequence must have a start and end element.

These two elements are automatically created when a command sequence is created and cannot be
deleted from the project configuration. Even if you have configured the complete project configuration
and deleted it, the start element and the end element are not affected by this deletion.

CONFIGURATION OF AN ELEMENT:

 Set the command sequences editor to edit mode.


 Select an element in the command sequences editor with a mouse click.
 Position this element in the command sequence grid by means of drag&drop.
You can position the element several times.
 Clicking on the Esc button deactivates the drag&drop functionality.

Step

A step is always linked to a configured action of Command Processing in the Command Sequencer
module. The actions are configured in the zenon Editor in the Command Processing module.

After positioning of a step in the command sequence grid, the Action selection dialog opens
automatically. In this dialog, you select an action from the list of all actions of all command groups
configured in the zenon Editor.

69
Command sequences in Runtime

ACTION SELECTION

Select an action and confirm the selection with OK. The Command Processing action is assigned to the
step as a result.

The OK button is active if no action has been selected. Only the linking of an action is permitted
for a step.

Information

You can find further information on configuration of the command processing in the
Energy Edition manual in the Command Processing chapter.

Transitions - conditions

Transitions are used after steps in order to ensure a defined transition from one step to the next.
Transitions display their internal status during the process and inform via a tool tip about status and
process duration.

70
Command sequences in Runtime

After positioning a transition in the command sequence grid, the Condition dialog opens automatically.

Select a response variable from the list of parameters. You get this list if you click on the Add button.

This list contains the response variables of all steps that have already been inserted into the command
sequence grid.

Information
You can find further information on conditions in the Formula editor (on page 80) chapter
in this manual.

Parallel branches

At the parallel branch an execution path parts into several execution paths which are executed in
parallel during the process. For the activation of the different elements within a parallel branch you
cannot define a certain order.

The project configuration always consists of a Begin parallel branch and an End parallel branch.

71
Command sequences in Runtime

BEGIN PARALLEL BRANCH

END PARALLEL BRANCH

In the process the respective intermediate area of the end parallel branch is also colored. The color
corresponds to the coloring of the command sequence.

A parallel branch is ended if the process has been completed in all execution paths. Completed means
that either the following step is active or the following transition is inactive.

INSERT PARALLEL BRANCHES

To create a parallel branch:


1. select the symbol Insert begin parallel branch
2. put the branch on the desired location
3. connect the input connection point with a output connection point of the preceding object
4. connect both output connection points with the desired following objects
5. close a parallel branch with object Insert end parallel branch

Branch

A branch offers the possibility to execute one of several possible paths. To do this, it is necessary that
the first element at the start of a procedure path is a transition.

A Begin branch can only have one transition (on page 70) as a subsequent object.

BEGIN BRANCH

72
Command sequences in Runtime

END BRANCH

PROCEDURE:

 The procedure path for which the first transition is TRUE is chosen.
 Then it is waited until all transitions have a value.
 If several transitions are TRUE at the same time, always the leftmost path for which the
transition is TRUE is selected.

For begin and end the following is true: If there is a step in front of the element and a transition behind,
the step remains active until the transition has been completed.

The objects are processed sequentially in a path. Each path processes its objects regardless of other
paths.

Command sequences can select sequences and run in parallel branches (on page 71).

branches and parallel branches consist of:


 Single or double horizontal lines
 Connection pieces (consisting of connection line and connection point)

CREATE A BRANCH

To create a branch:
1. Select the Insert begin branch symbol
2. Position the branch at the desired location.
3. Connect the input connection point to an output connection point of the preceding object.
4. Connect both output connection points with the desired following objects.
5. Close a branch with the Insert end branch object

73
Command sequences in Runtime

Modify parallel branches and branches

MODIFY AND MOVE

Branches and parallel branches can be moved and changed in size.

MOVE

To move an object:
1. click on the object.
2. Hold down the mouse button.
3. Move the object to the desired position.

CHANGE SIZE

In this way object Begin/End branch/parallel branch can be extended and shortened. To change their
size:
1. Move the mouse pointer over the object until it turns into a double arrow.
2. Hold down the left mouse button and move it in the desired direction:
 Away from the object to extend it.
 Into the object to shorten it.
 The line to continue the command sequence remains unchanged each time.
3. at extending a new connection piece is added;
 All fields in which lengthening is possible are colored green.
 The process must be repeated to add several new connection pieces.
4. All corresponding connection pieces are deleted during shortening.

Switchgear allocation

Each item of switchgear is represented by its response variable.

The switchgear allocation element of the Command Sequencer module triggers the allocation of one
or more switching devices in Runtime:

74
Command sequences in Runtime

 With this element, several (or all) response variables can be reserved (assigned) in advance. The
NET_SEL status bit is set for this reservation.
 Unlocking is also carried out using a switchgear assignment element.

After the command sequence process, all NET_SEL status bits are automatically deleted again.

LIST OF SWITCHGEAR

Lists all available switchgear, its assignment and unlocking type. The list can be sorted - multiple
selection is possible.

75
Command sequences in Runtime

Parameter Description
Switchgear Switchgear according to configuration of the Command
Processing in the zenon Editor.
Allocation Yes, if Switchgear allocation is active.
Empty if Release is active.

Release Yes, if Switchgear release is active. In addition, the


extent of the release is shown as text:
 selective
 global
Empty if allocation is active.

ACTION

Parameter Description
Switchgear allocation If activated, the element is allocated to selected
switchgear.
Switchgear release If active, the element releases the selected switchgear.
Clearing the last allocation If active, only the switchgear that was allocated in the last
allocation is released.
Only active if release for the switchgear is active.
Global command sequence release If active, the switchgear that is allocated in the current
allocation is released.
Only active if release for the switchgear is active.
Allocated switchgear is automatically released
again if the command sequence has been completed
successfully or canceled.

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.

76
Command sequences in Runtime

Jump target

The jump target element allows a direct jump to a defined point of a branch.

Jump targets make it possible to


 To jump between procedure paths
 To jump out of branches
 engineer loops

Jump targets consist of tree inputs and one output. At this the output is always at the bottom and the
inputs are located at the top and the sides. You can connect any input connection points. A path which
ends in a jump target must have started with a Begin branch. Otherwise the end is not reached.

During the editing all connection points are visible. In the checking mode only the connection points
which are connected are displayed.

Attention

Jump targets are not allowed for parallel branches.

Teaching cursor

The teaching cursor element visualizes each position in the command sequences grid, according to
which the recorded element is placed during the teaching process.

The teaching cursor is not directly available to select as an element. It is provided by activating the
teaching mode automatically.

The teaching process is not started without the teaching cursor being positioned.
If the recording is ended by clicking on the Stop teaching button, the teaching cursor is also hidden
again.

POSITIONING

To position the teaching cursor in the command sequence grid:


1. Click (with simulation mode active) the Start Teaching button.

77
Command sequences in Runtime

2. The teaching cursor is displayed and can be positioned in the command sequence grid.

NEW POSITIONING

The teaching cursor can be repositioned during an ongoing teaching process.

In the command sequence grid, move the teaching cursor with drag&drop and place the teaching cursor
at the desired position in the grid. The steps applied from teaching are inserted into this new cursor
position.

This repositioning can be repeated several times. As a result, different branches of a parallel branch can
be configured with the teaching process.

Lines

Lines connect elements via free connection points. To connect connection points with each other:
1. Activate a point with the help of the mouse:
The connection point turns green. Red means that the connection point is already taken.

2. Drag a line to another connection point:


A yellow arrow shows the direction of the line.. Green fields can be crossed. Red fields may not
be crossed by the line.

78
Command sequences in Runtime

3. As soon as the yellow tip of the line touches the next connection point, the line is created.

LINE HANDLING

LINES:

 Are dragged with the mouse.


 Can be moved (press and hold Ctrl key)
In doing so, all existing connections are separated and an attempt is made to reconnect the line
if there are objects with connection points in the right direction at the target.
If several lines are highlighted, the line that has a cell with mouse cursor in it is moved.
 Can be deleted by highlighting them and pressing the Del key.
 Are deleted when re-dragging them from the start to end.
 have a tool tip displaying its ID.

If a line reaches a connection point of an object, the connection point becomes active. If a connection is
possible, it turns green otherwise red. Connections connecting two connections points of the same type
- two inputs, two outputs, etc. - are not allowed. The line can be added in any case. Not allowed
connections are displayed in red and trigger a corresponding error message at testing.

The connection points of the elements are always displayed in the edit mode even if the connection
point in question is connected. In status "Release" no connection points are displayed.

PROPERTIES CONNECTION POINT:

 connected: highlighted red; connection is separated when the line is dragged and a new
connection point can be chosen
 open: highlighted green; at dragging a new line is created

LINES CONNECT ELEMEN TS

 Lines can be used as connections between all elements. It is allowed to add any number of lines
after another.

79
Command sequences in Runtime

 Lines must not be used to connect two equal connection points.


For example: Both inputs of two steps must not be connected directly with a line. In the
engineering this connection is allowed. It is however displayed in red (error) and in the validation
(on page 99) an error message is displayed.

Formula editor

The formula editor is automatically opened if you need to enter or edit a formula. Above all:
Runtime:
 Editing transitions.

If the step referenced in the formula is removed and a new step is added, the operands are
reassigned in the case of transitions. To do this, the same step must be reinserted. Parameters from a
different phase are not automatically linked.

ENTER FORMULA

The following input is accepted:


 Constant as decimal number
 Hexadecimal number if it is preceded by an x
 Dot as decimal separator; the following is true:
 Comma is automatically converted into a dot: 23,000 to 23.000

80
Command sequences in Runtime

 Decimal places which are only zeros are removed: 23.000 to 23

81
Command sequences in Runtime

Parameter Description
TAG list List of the tags which can be used for the formula.

Each entry contains of:


 a basis node for the label
 a value
 a status
 the bits for value and status

A symbol at the first node displays whether it is a command or return


tag.

The short indentifier at the beginning of the name is used for the
formula.
Add Opens the dialog for adding a parameter (on page 85). For this, the
following applies:
 The following can be added: numeric and binary tags and tags for time
duration. Values for duration are converted to seconds
 For conditions of a step, only the properties that were created for it can
be used.
 Tags can be added multiple times.
Replace Makes it possible to replace a tag. Clicking on the button opens the
dialog to add a parameter (on page 85).
 Selection of a new parameter replaces the highlighted parameter.
 Clicking on the no selection button deletes the highlighted parameter
from the list.

The short identifier remains the same at replacing.


Remove Removes the highlighted tag. For a tag to be deleted:
 the formula must be correct
 the selected tag must not be used in the formula
Logical operators Via the buttons for operators, operators are added to the formula.
AND logical 'AND'
OR logical 'OR'
XOR logical 'EXCLUSIVE OR'
NOT Negation
Syntax The operator buttons add the string shown on them to the formula.

82
Command sequences in Runtime

( Open parenthesis
) Close parenthesis

Bit by bit and relational


operators

& And
| Or
> greater than
>= greater or equal
< less than
<= Less than or equal
= equal
<> less or greater
Condition Configuration and display of the formula.
Copy Copies the whole formula:
 All configured tags from the tag tree
 Formula from the field
Paste Pastes a formula from the clipboard. At this all already configured
elements are deleted and replaced by the copied formula.

When copying formulas between steps, an attempt is made to


resolve the operands via their names. For tags which are not found
invalid entries are created in the operands list. Their point of use in
the formula remain the same.
OK Applies formula and closes the dialog.

For this the formula must be correct.


Cancel Discards all changes and closes the dialog.

Information
You can link up to 99 tags in a formula. X01 to X99. The length of the formula must not
exceed 4096 characters.

83
Command sequences in Runtime

THE MEANING OF THE B ITS:

Parameter Description

value bits 32 value bits (from 0 -31) are available. They describe the tag value bit by bit. For
binary tags only bit 0 is of importance, for SINT and USINT only the bits from 0 - 7,
etc.
State bits Here you find the most commonly used status bits. You find the exact definition
and use of the status bits in the Status Bits List (on page 86).
value and status In the formulas, all values (value bits and status bits) are treated as binary values
and can be logically linked with AND, OR, etc.
The total value and overall status are an exception to this. In order to arrive at a
Boolean expression, this total value has to be ORed bitwise with a constant. For
this, we use the operator &.
For the result 0 (FALSE) of this logical ORing, we get the binary value 0 (FALSE),
otherwise 1 (TRUE).
Example: See the bitwise ORing example chapter

Info
The status bits NORM and N_NORM are only available in the formula editor and cannot
be engineered via the status.

Information

Formulas with binary X values and bitwise linking can be used with a maximum of 2 binary
values. If more values are required, the linking must be carried out without binary X values.
Example:

X01.Value & X02.Value -> works

X01.Value & X02.Value & X03.Value -> does not work

But:

X01.00 AND X02.00 AND X03.00 AND X04.00 AND X05.00 -> works

84
Command sequences in Runtime

Adding parameters

Clicking on the Add button in the formula editor (on page 80) opens the dialog to select parameters that
are to be used for a formula.

Parameter Description
Project list Display of the active project. Only parameters that have been created in the
active project for the step to be configured can be selected.
Parameter List List of the parameters available for the selected step.
Multiple selection is possible. Apply by selecting and clicking on the OK button
or by double clicking on a parameter.
No selection Deletes parameters already set. Only effective for replacement of parameters.
If a parameter is highlighted in the formula editor and this dialog is opened by
clicking on the Replace button, then clicking on the No selection button
deletes the parameter from the list in the formula editor.
The short identifier remains the same at replacing.
OK Inserts selected parameters into the parameter list of the formula and closes
the dialog.
Cancel Discards selection and closes dialog.
Help Opens online help.

85
Command sequences in Runtime

List of status bits

Bit number Short term Long name zenon Logic label


0 M1 User status 1; for Command _VSB_ST_M1
Processing: Action type "Block";
Service Tracking
(Main.chm::/IEC850.chm::/117281.
htm) of the IEC 850 driver
1 M2 User status 2 _VSB_ST_M2
2 M3 User status 3 _VSB_ST_M3
3 M4 User status 4 _VSB_ST_M4
4 M5 User status 5 _VSB_ST_M5
5 M6 User status 6 _VSB_ST_M6
6 M7 User status 7 _VSB_ST_M7
7 M8 User status 8 _VSB_ST_M8
8 NET_SEL Select in the network _VSB_SELEC
9 REVISION Revision _VSB_REV
10 PROGRESS In operation _VSB_DIREC
11 TIMEOUT Command "Timeout exceeded" _VSB_RTE
(command runtime exceeded)
12 MAN_VAL Manual value _VSB_MVALUE
13 M14 User status 14 _VSB_ST_14
14 M15 User status 15 _VSB_ST_15
15 M16 User status 16 _VSB_ST_16
16 GI General query _VSB_GR
17 SPONT Spontaneous _VSB_SPONT
18 INVALID Invalid _VSB_I_BIT
19 T_STD_E External standard time (standard _VSB_SUWI
time)
up to version 7.50, this
was the status bit T_CHG_A
20 OFF Switched off _VSB_N_UPD
21 T_EXTERN Real time - external time stamp _VSB_RT_E
22 T_INTERN Internal time stamp _VSB_RT_I
23 N_SORTAB Not sortable _VSB_NSORT
24 FM_TR Error message transformer value _VSB_DM_TR

86
Command sequences in Runtime

25 RM_TR Working message transformer _VSB_RM_TR


value
26 INFO Information for the variable _VSB_INFO
27 ALT_VAL Alternate value _VSB_AVALUE
28 RES28 Reserved for internal use (alarm _VSB_RES28
flashing)
29 N_UPDATE Not updated (zenon network) _VSB_ACTUAL
30 T_STD Internal standard time _VSB_WINTER
31 RES31 Reserved for internal use (alarm _VSB_RES31
flashing)
32 COT0 Cause of transmission bit 1 _VSB_TCB0
33 COT1 Cause of transmission bit 2 _VSB_TCB1
34 COT2 Cause of transmission bit 3 _VSB_TCB2
35 COT3 Cause of transmission bit 4 _VSB_TCB3
36 COT4 Cause of transmission bit 5 _VSB_TCB4
37 COT5 Cause of transmission bit 6 _VSB_TCB5
38 N_CONF Negative confirmation of command _VSB_PN_BIT
by device (IEC 60870 [P/N])
39 TEST Test bit (IEC870 [T]) _VSB_T_BIT
40 WR_ACK Writing acknowledged _VSB_WR_ACK
41 WR_SUC Writing successful _VSB_WR_SUC
42 NORM Normal status _VSB_NORM
43 N_NORM Deviation normal status _VSB_ABNORM
44 BL_870 IEC 60870 Status: blocked _VSB_BL_BIT
45 SB_870 IEC 60870 Status: substituted _VSB_SP_BIT
46 NT_870 IEC 60870 Status: not topical _VSB_NT_BIT
47 OV_870 IEC 60870 Status: overflow _VSB_OV_BIT
48 SE_870 IEC 60870 Status: select _VSB_SE_BIT
49 T_INVAL External time stamp invalid not defined
50 CB_TRIP Breaker tripping detected not defined
51 CB_TR_I Breaker tripping detection inactive not defined
52 OR_DRV Value out of the valid range (IEC not defined
61850)

53 T_UNSYNC ClockNotSynchronized (IEC 61850) not defined

87
Command sequences in Runtime

54 PR_NR Not recorded in the Process not defined


Recorder
55 RES55 reserved not defined
56 RES56 reserved not defined
57 RES57 reserved not defined
58 RES58 reserved not defined
59 RES59 reserved not defined
60 RES60 reserved not defined
61 RES61 reserved not defined
62 RES62 reserved not defined
63 RES63 reserved not defined

Information
In formulas all status bits are available. For other use the availability can be limited.

You can read details on status processing in the Status processing chapter.

Logical Operators

Logical links: Variables will only be checked for the logical value '0'; if the value does not equal '0', it will
be considered as '1'.

In contrast to bit formulas, the technical range can be modified by a stretch factor -> (not equal '0' or
'1').
Operator Meaning
AND logical 'AND'
NOT Negation
OR logical 'OR'
XOR logical 'EXCLUSIVE OR'

The operators have the following priority in the formula calculation:

88
Command sequences in Runtime

Priority Operator
1 & (operator for bit formulas)
2 NOT
3 AND
4 XOR/OR

Info
Up to 99 variables can be linked in one formula. X01 to X99.

Info
The status bits NORM and N_NORM are only available in the formula editor and cannot
be engineered via the status.

Bit formulas

Bit formulas only have a logical high or low state. In contrast to logical formulas, the raw value is already
predefined (0,1).
Operator Description
& AND
| OR

Example: ORing bitwise

You want to find out if one of the user status bits 1-8 (M1 ... M8) of the variable X01 is set.

USUAL FORMULA:

X01.M1 OR X01.M2 OR X01.M3 OR X01.M4 OR X01.M5 OR X01.M6 OR X01.M7 OR X01.M8


This query can be made much easier by the logical ORing of the overall status.

89
Command sequences in Runtime

LOGICAL ORING

X01.Status & 0xFF

The constant can be entered in hexadecimals, as described above:

0xFF corresponds to decimal 255; these are the first eight status bits (binary 11111111). If one of
these bit is set to 1, the result of this bitwise ORing is 1 (true), otherwise it is 0 (false).

If, for example, all user status bits except the user status bit M7 should be queried, the binary statement
for this would be: 10111111. Bit 7 is not of interest and is thus set to 0. This corresponds to 0xBF in
hexadecimal. The expression for the formula is then: X01.Status & 0xBF.

Instead of ORing bitwise with a constant, the value can also be directly compared to a decimal number.
If the comparison is wrong, the binary value is 0 (false) otherwise it is 1 (true).

You want to find out if the value is equal to the constant 202: The formula is:
X01.value = 202

If the value is equal to the constant 202, the result of the comparison is 1 (True) otherwise it is 0
(False).

The bitwise ORing works with the OR character (|), the same as in this example.

Comparison operators

Comparison operators are for the direct comparison of two numeric values. The result of this
comparison is a binary value. "0“ if the condition is not fulfilled and „1“ if the condition is fulfilled.
Operator Description
< less
> greater
<= Less than or equal
>= greater or equal
= Equal
<> unequal

To the left and to the right of the comparison operator, there has to be a (total) value or a (total) status,
single bits cannot be used with these comparison operators.

There can also be a constant to the right of the comparison operator.


These constants are entered as hexadecimal values or decimal values in the combined element.
Hexadecimal numbers are automatically converted to decimal numbers by clicking on OK. For example,
0x64 corresponds to the numerical value 100.

90
Command sequences in Runtime

The combined element is not available in the Batch Control module.

Example
X01.value >= X02.value
The result is 1, if the value of X01 is higher than or equal to the value of X02

X01.value = 0x64
The result is 1, if the value of X01 is exactly equal to the numeric value 100 (= hex 0x64)

(X01.value = 0x64) OR (X01.value = 0x65)


The result is 1, if the value of X01 is exactly equal to the numeric value 100 or 101 (= hex
0x64 and hex 0x65)

Examples for formulas

SIMPLE LOGICAL AND LINKING BETWEEN TWO B IT VALUES

Example
Formula: X01.03 AND X02.03

This formula has the status TRUE, if both bit 3 of variable 1 and bit 3 of variable 2 both have the value 1.

COMPARISON OF AN VALUE OR STATUS OF A VARIABLE

Example
(X01.Value> X02.Value)

COMPARE COMPARISONS TO ONE OTHER ON A LOGICAL BASIS

Example
(X01.Value> X02.Value) AND (X01.Value = X02.Value)

91
Command sequences in Runtime

COMPARE WITH VALUE B ITS AND STATUS BITS

Example
(X01.Value> X02.Value) AND (X01.Value = X02.Value) OR (X01.03 = X02.03)

COMPARE A VALUE WITH A DECIMAL OR HEXADECIMAL VALUE

Example

Formula: (X01.Value = 111)


Formula: (X01.Value = 0x6F)

If a hexadecimal values is used, this is later transferred to decimal by clicking on OK. If a decimal value is
entered and confirmed, the value continues to be displayed as a decimal value after reopening.

Info
It is not possible to use a comma or a period when entering values.

11.1.6 Toolbar - Command sequences editor (execution mode)

92
Command sequences in Runtime

Parameter Description
Start command sequence Starts command sequence
not available during redundancy switching.
Pause command sequence Stops current command sequence and pauses it.
Continue command sequence Continues paused command sequence.
Only active if the command sequence was previously
paused with Pause command sequence.
Abort command sequence Aborts the command sequence that is running.
User interactions Switches to the Command Processing screen. To do this, a
step must be active in the command sequence. This step
must be selected by clicking on the mouse.
The screen that was linked in the Command Processing
action is called up. If no screen is linked in the Command
Processing action, the linked screen of the Command
Processing group is used.
Only active is the action is being executed and a
user interaction is expected, for example with a two-step
action or an active interlocking.
Check command sequence for errors Checks configured command sequence for logical
consistency and possible errors.
The result is displayed in a dialog.
 No errors during this command
sequence.
 Checking the command sequence
resulted in the following
warnings/errors:
{error details}
Edit element Calls up a dialog with the element properties for
switchgear allocation (on page 74) and transition (on
page 70).

No changes can be made in execution mode. Switch


the editor to edit mode in order to make changes.
not available for step.
Graphical design Calls up dialog to select the graphical design (on page 65).
The following can be selected:
 Background color
 Grid On/Off
 Grid color
 Show element IDs

93
Command sequences in Runtime

Switch to automatic mode Switches execution of the switching step to automatic


mode (on page 61).
Switch to semi-automatic mode Switches execution of the switching step to
semi-automatic mode (on page 61).
Continue command sequence only at Continues a command sequence from the selected
selected execution position element only.

only available in semi-automatic mode.


Continue command sequence at all Continues a command sequence at all positions available
execution positions - regardless of the respective position of the mouse
pointer.
only available in semi-automatic mode.
Switch command sequence to edit mode. Switches to edit mode - command sequences can be
edited and repositioned.

11.2 Create command sequence

Command sequences are named and renamed in the Command sequence configuration dialog. A
descriptive text can also be configured.

You create a new command sequence in the list of command sequences (on page 36).

94
Command sequences in Runtime

Parameter Description
Name Name of the new command sequence.
The name must not contain a question mark (?), a
semicolon, an @ or an asterisk (*).
Maximum length: 256 characters.
When duplicating command sequences, the
existing name is supplemented with the prefix "Copy of".
If the maximum length is exceeded by this, the name is
shortened to the allowed length starting from the last
character.
Description (Optional) text for the description of a command
sequence.
You can change the description afterwards. To change the
description, select the Rename command sequence
symbol.

CLOSE DIALOG

Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.

11.3 Tooltips

Tool tips in the command sequence editor visualize the respective status of a step and provide further
information via the respective status (on page 96).

DISPLAY OF THE TOOL TIP:

To have a tool tip displayed, go to the respective step in the command sequence grid. The tool tip
appears automatically when the mouse is positioned over the step.

STRUCTURE:

The tool tip consists of:


 Command Processing command (action of a Command group)
 Internal ID

95
Command sequences in Runtime

 Allocated switchgear
 General
 Step status
 Internal state
 Number of executions
 Overall duration
(duration)
 Date and time stamp for start and end
 Chronological sequence in detail
(overall duration)
 Switchgear allocation
Date and time stamp for start and end
 Duration of execution
Date and time stamp for start and end
 Wait for subsequent condition
Date and time stamp for start and end

11.4 Execution status

The following states are possible:

96
Command sequences in Runtime

Status Description
Idle The command sequence is in idle state.
In execution When starting a command sequence, it changes to running status.
Skipped A step was skipped due to the project configuration (on page 30).
Executed As soon as the execution is finished, the command sequences switches to
Finished status. In this status execution is not possible.
Pausing The command sequence switches to paused status.
Paused Within the command sequence, the process stops at:
 Waiting for Finished
 Waiting for Allocation
 Waiting for interlocking condition
 Waiting for Phase finished
 Check for parallel execution
Aborting Aborts the process and changes to Aborted.
Aborted Command sequence process was aborted.
If a command sequence cannot be started when the process is repeated, its status
automatically changes to aborted.
Newly-occurred Command sequence is stopped. Aborting the command sequence is now possible.
interlocking
This status occurs in the following scenario:
 An interlocking condition (one-step or two-step) waits for
confirmation.
 Whilst a confirmation is waited for, the active interlocking has
changed again.

ACTIVE ELEMENT AND JUMP TARGETS

Status Description
Continue If an object is paused and an active element is located after it, continue has the
same effect as Next step. This also includes jumps.
For a step command, the command only affects the jump in the same branch.
Break Has now effects for jump targets. Already defined targets remain.
Others Always causes the deletion of the jumps.
For a step command, only the jump in the area of the command sequence is
deleted.

97
Command sequences in Runtime

11.5 Symbols and Color

The states during the process of a command sequence are displayed using different symbols. Some
symbols are also used for transitions and end parallel branch.

SYMBOLS AND WHAT THEY MEAN:

Symbol Meaning
Command sequence starts
The connection is established.
Wait for switchgear allocation. The switchgear of the step is already used in a different command
sequence or is already assigned the NET_SEL status bit.
 During the execution of a step and the waiting for Reaction finished.
 With transitions: Whilst running and waiting for transition condition.
 With end parallel branch: Waiting for all branches combined.

Step has finished


 With transitions: Waiting for transition condition met.
 With end parallel branch: Waiting for all parallel branches finished and waiting for following
condition.
Values are written.

User interaction required.


Calls up configured Command Processing screen.
Command sequence is in semi-automatic mode and waits for the next step.
To do this, click on the "Continue command sequence at all execution positions" button. It
calls up the Command Processing screen (on page 115).
Multiple executions.
Occurs with an attempt to execute the exact same of steps at the same time.

If an error occurs during a step, the step is marked as faulty until it is restarted.

If a command sequence is paused, the current status is shown as a symbol.

STATUS

The execution status (on page 96) of steps, transitions and End parallel branch is visualized in color:

98
Command sequences in Runtime

Status Color
Idle: White
In execution: green
Skipped: petrol
Finished: blue
Pausing: Two colors:
 orange
 Original color
Paused: orange
Aborting: Two colors:
 red
 Original color
Aborted: red
Restarting: Two colors:
 green
 Original color
Timeout: red border

Newly-occurred interlocking red border

BEHAVIOR FOR THE STO P COMMAND

After a Stop command, the steps, transitions and end parallel branch immediately go to Stopped status,
even if other elements are still waiting for a condition for stopping. Further subsequent commands such
as Cancel are ignored. The Stopped status remains displayed.

11.6 Validate command sequence

Command sequences can be checked for errors during configuration.


 Validation is only possible in edit mode.
 Validation takes place automatically when switching from edit mode to execution mode.

To validate a command sequence, click on the corresponding symbol in the toolbar of the command
sequences editor in Runtime (green tick - Check command sequence for errors). The command

99
Command sequences in Runtime

sequence thus is checked for functionality according to internal rules; the following in particular is
checked:
 Syntax (all lines connected, processable from begin to end, etc.)
 Variables
 Data Types

The result of the check is displayed as a dialog in plain text. Found errors are also saved in the log file
which can be analyzed with the Diagnosis Viewer.

Rules that must be adhered to during configuration can be found in the Project configuration rules for
recipes chapter.

Attention
Command sequences that are not connected at the time of validation are ignored during
validation. Their content and processes are not checked.

DIALOG: VALIDATION O K

DIALOG: VALIDATION W ITH ERRORS

If errors occur during checking, they are displayed in this dialog.

This error information includes:


 Error number
 Element ID
 Position in the command sequence grid

100
Command sequences in Runtime

 Error text

11.7 Teaching

Configured Command Processing processes can be recorded in the zenon Runtime simulation with the
help of teaching. As a result of this process, corresponding command sequences are configured in the
simulation image in Runtime during the teaching process.

The command sequence configuration created this way can still be changed manually and imported in
real time by importing the simulation image created as a result.

All steps are carried out in zenon Runtime. Additional configuration in for teaching in the zenon Editor is
not necessary.

Information
The teaching process for the Command Sequencer module is also available if Runtime
is running in Process Recorder's playback mode.

11.7.1 Teaching process

Command Processing actions are processed in a project simulation during an active teaching process
and applied in the command sequence selected for teaching. The Command Processing action is
incorporated as a step element in the command sequence grid. Elements can also be inserted manually
in the command sequence grid during teaching. The teaching process is not interrupted as a result.

In order to be able to execute Command Processing actions from different process images, the teaching
process also remains active when the command sequences editor is closed.

During this process, it is possible to switch between Command Processing screens and desired zenon
screens in Runtime. It is thus also possible to apply Command Processing actions from different zenon
screens in the command sequence. A requirement for this is that there is at least one Command
Processing action included in the respective zenon screen.

Teaching is always carried out in the project simulation. As a result, it is ensured that ongoing real-time
operation is not affected or that damage is caused by incorrect project configurations. The command
sequence can also be edited and changed after the teaching process. An element can still be added
manually and processes can be rearranged.

For a command sequence, the teaching process can be repeatedly started and stopped in the simulated
Runtime environment.

101
Command sequences in Runtime

The command sequences edited in this way can then be imported into the list of command sequences (on
page 42) in real-time operation with the Import command sequence from simulation image (on page
51) button.

TEACHING IN THE COMM AND SEQUENCE GRID

The teaching cursor can be positioned in any free cell in the command sequence grid by means of
drag&drop. Repositioning of the teaching cursor is possible at any time. For example, for parallel
branches, the individual branches can be taught consecutively.

During the teaching process, for each Command Processing action executed, the corresponding step is
inserted into the cell of the command sequence grid on which the teaching cursor is currently located.
Once a step has been inserted, the teaching cursor is moved down one cell.

If the new teaching cursor position is already occupied by an existing command sequence project
configuration, all elements below this in the grid are moved down one line. If existing lines are
separated as a result, these are automatically connected again. As a result, it is ensured that a valid
command sequence that already exists remains free of errors through the teaching process.

Expansion of the grid is possible up to a total of 1,000 lines. The teaching is canceled after this limit has
been reached. The user is informed of this with a dialog.

11.7.2 Dialog when teaching is canceled

Certain events in zenon Runtime lead to an ongoing teaching process being canceled. This cancellation
of the teaching process is visualized with warning dialogs. In addition, CEL entries and LOG entries are
created for the respective events.

The teaching process is canceled:


 When the project simulation is stopped in Runtime.
 When the Stop teaching button is clicked on.
 When the mode of the taught command sequence is switched from edit mode into execution
mode.
 During an XML export of the taught command sequence.
Caution, no warning dialog appears here. The teaching is stopped automatically. The
previously-taught elements are retained however.
 With XML import, if the taught command sequence is already present in the XML import file and
Overwrite existing command sequence is selected for the import options. The
previously-taught elements are lost!
 In the event of changes to the taught command sequence:

102
Command sequences in Runtime

 Save
 Delete
 Rename

In doing so, no distinction is made on how the command sequence is changes: for example, by means of
keyboard shortcut, clicking on a corresponding symbol, selection from a context menu, etc.

DIALOGS DURING TEACHING

When the teaching process is canceled, the user is notified of this with warning dialogs. Different dialogs
are shown depending on the cause of cancellation.

CLOSING ZENON RUNTIM E

If Runtime is closed during an active teaching process, the user is notified of this with a dialog:

Parameter Description
Yes The changes are saved in the current command sequence
to be taught.
Runtime is closed.
No The Runtime will be closed. The new elements of the
command sequence are not saved.

If no button is clicked on, Runtime is automatically closed once 15 seconds have elapsed. The current
command sequence is not saved.

103
Command sequences in Runtime

NO AVAILABLE LINE IN THE COMMAND SEQUENCE GRID

The command sequence grid is expanded by one line during the teaching process if necessary. If the
maximum number of 1,000 lines has been reached, the teaching process is canceled and the following
dialog is displayed:

Parameter Description
Yes Ends the active teaching process and saves the project
configuration of the command sequence.
No Ends the active teaching process.
All new elements since the last save are lost.

RENAMING THE COMMAND SEQUENCE

If a command sequence is renamed during an active teaching process, the teaching is canceled. The
following dialog appears:

104
Command sequences in Runtime

Parameter Description
Yes Ends the active teaching process. The command
sequence is saved with the current content for the
command sequence.
A new teaching process is possible.
No The command sequence is not renamed.
The current teaching process is continued. Changes that
have previously been made are not saved.

DELETING THE COMMAND SEQUENCE

If a command sequence is deleted during an active teaching process, the following dialog is displayed
before deletion:

105
Command sequences in Runtime

Parameter Description
[Name of the command sequence] Name of the command sequence that is to be deleted.
It is always only the current command sequence name
that is displayed. The next command sequence to be
deleted is shown after the Yes or No button is clicked
on.
Yes Ends the active teaching process. The command
sequence is saved with the current content.
A new teaching process is possible.
No The command sequence is not renamed.
The current teaching process is continued. Changes that
have previously been made are not saved.
Yes all Deletes all selected command sequences without
requesting confirmation.
Not active if only one command sequence has
been selected for deletion.
No all Does not delete any of the selected command sequences.
The teaching process for the command sequence to be
taught continues to be active.
Not active if only one command sequence has
been selected for deletion.

11.7.3 Engineering

In order to be able to use teaching in zenon Runtime, process screens with a corresponding (Command
Processing) engineering in the zenon Editor are required.

In addition, carry out the following steps:

ENGINEERING IN THE E DITOR

 Create a screen of type Command Sequencer


 Insert the Command sequence editor control element template into the screen.
 Create a screen switching function for the configured screen.
 Create an activate/deactivate project simulation function.
 Link the created functions in the project.

106
Command sequences in Runtime

RUNTIME

1. Start the zenon Runtime.


2. Start the project simulation.
3. Change to the Command Sequencer screen
a) Create a new command sequence or select an existing command sequence for editing.
b) Click on the Start teaching button in the command sequence editor.
c) Position the teaching cursor element in the command sequence grid.
4. Switch to any desired process screen.
5. Carry out the Command Processing actions.
The corresponding step to the command sequence is added in the command sequence grid. This
also happens if the command sequence image is not displayed in Runtime.
6. If necessary, edit the command sequence configuration. To do this, switch to the command
sequencer screen:
a) Taught steps can be repositioned in the command sequence grid by means of drag&drop.
b) The teaching cursor can be repositioned in the command sequence grid for another teaching
process by means of drag&drop.
c) To do this, continue the teaching process with step 4.
7. End the teaching process by clicking on the Stop teaching button.
8. Correct the end element at the end of the command sequence configuration.
An empty line always remains before the end element by ending the teaching process.
Move the end element up one position or drag a line through the empty cell that has been
created in order to complete the command sequence configuration correctly.
9. Check your command sequence configuration by clicking on the Check command sequence for
errors button.

10. End the Runtime simulation.


11. Switch to the command sequences editor
12. In the List of command sequences window, click on the Import command sequence from
simulation image (on page 51) symbol.

13. Select, in the import options dialog, the desired command sequence and accept this by clicking
on the OK button in the list of command sequences.

11.8 Configuration rules for command sequences

The following important principles are applicable for configuration:

107
Command sequences in Runtime

GENERAL

 For all elements all connection points must be connected.


Exception: Jump targets. Only two of the three input connection points need to be linked there.
 The begin element is always present only once with a command sequence and marks the
beginning of the process.
The begin element cannot be deleted.
 The end element is always present only once with a command sequence and marks the end of
the process.
The end element cannot be deleted.
 Steps can be inserted anywhere. Several steps can also be placed in succession.
 There should be at least one active step in a command sequence.

TRANSITIONS

 Two transitions may not lie one after the other.

BRANCHES

 The first element after a Begin branch must be a transition.


 The individual branches which start at Begin branch must all end in an End branch never in an
End parallel branch. Any element can be placed between begin and end of a branch even
parallel branches as long as they are closed before the End branch element. An end branch can
be replaced with jump targets at any point, including within a parallel branch.
 It is not necessary to have an End branch for each Begin branch. You can, for example, have two
Begin branch elements ending in one End branch, or the other way round.

 It is not necessary to have an End branch for a Begin branch. It can simply end in a line. If for
example you have a Begin branch element with two paths and one of the paths ends in a jump
target, it does not make sense to have an End branch.

PARALLEL BRANCHES

 Each parallel branch must contain at least one step.


 The first element after a Begin parallel branch must not be a transition.
 The individual branches that start at a Begin parallel branch must all end in one End parallel
branch, but must never end in an End branch. You may use any elements between Begin
parallel branch and End parallel branch even branches as long as they are closed before the
End parallel branch.

 Not all branches which were started in a Begin parallel branch must end in an End parallel
branch. It is enough when all branches converge over an End parallel objects. Equally branches
from different Begin parallel branch objects may converge in a single End parallel branch.

108
Command sequences in Runtime

 parallel branches allows embedding of additional parallel branches.


In doing so: each embedded parallel branch must recombine with the superordinate parallel
branch

LINES IN THE COMMAND SEQUENCE GRID

 Lines may be used as connections between any objects. It is allowed to add any number of lines
after another.
 Lines must not be used to connect two equal connection points.
For example: Both inputs of two steps must not be connected directly with a line. In the
engineering this connection is allowed. It is however displayed in red (error) and in the validation
(on page 99) an error message is displayed.

JUMP TARGETS

 Jump targets correspond to an end branch. They are intended to


 jump between branches,
 jump out of branches,
 engineer loops
For this, the following applies: A path which ends in a jump target must have started with a
Begin branch. Otherwise the end is not reached.

 Jump targets consist of tree inputs and one output. At least two inputs and the output must
always be connected. At this it makes no difference which input connection point is connected.
 Jump targets can be switched consecutively if at least two input connection points are allocated.
 Jumps are prohibited:
 between parallel branches
 to jump out of a parallel branch
 to jump in a parallel branch.

11.9 CEL entries

Processes in zenon Runtime are supported and visualized by entries in the Chronological Event List.

The following entries are written to the CEL:


 Command sequence created:
Command sequence [command sequence name] created

109
Command sequences in Runtime

 Command sequence duplicated:


Command sequence duplicated. New: [command sequence name] source: [command
sequence name]
 Command sequence renamed:
Command sequence renamed. New: [command sequence name] old: [command
sequence name]
 Command sequence completed:
Command sequence [command sequence name] completed
 Command sequence canceled:
Command sequence [command sequence name] canceled
 Manual step executed:
Manual script executed. Command sequence [command sequence name]; previous
element ID: [Element ID] (column [column number in the command sequence grid]
– line [line number in the command sequence grid])
 Manual jump carried out:
Manual jump carried out. Command sequence [command sequence name]; start:
Subsequent element ID: [Element ID] (column [column number in the command
sequence grid] – line [line number in the command sequence grid]) – target:
Previous element ID: [Element ID] (column [column number in the command
sequence grid] – line [line number in the command sequence grid])
 Skip step:
The action [step name] was skipped.

Information

You can find further information on CEL in the Chronological Event List manual.

110
Command sequences and simulation mode

12. Command sequences and simulation mode

12.1 Import command sequence(s) from simulation image

In this dialog, you arrange configured command sequences from one or more simulation images for
import into zenon Runtime.

111
Command sequences and simulation mode

Parameter Description
Project simulation List of all existing project simulation images.
Only one simulation image can be selected at a time.
Command sequences in project simulation List of all configured command sequences from the
selected project simulation.
Multiple selection is possible.
Existing command sequences Pre-existing command sequences in the zenon project
that is currently running.
Add Adds selected command sequences from the Command
sequences in project simulation list to the List of
command sequences to be applied.
Only active if at least one command sequence from a
simulation image has been selected.
Overwrite Adds a command sequence from the Command
sequences in project simulation list to the List of
command sequences to be applied. This
command sequence overwrites the existing command
sequence in the command sequences editor in Runtime!
This button is only active if just one command sequence
has been selected and the selected command sequence is
already in the existing command sequences list. The
command sequence is thus already present in the
command sequences editor and is overwritten.
With multiple selection of command sequences from a
project simulation, the button is then grayed out if the
selection contains a command sequence that is not yet
present in the list of existing command sequences. A
new command sequence is created when transferring to
Runtime. This new project configuration is given a serial
number in the naming.

List of the command sequences to be Assigned command sequences that are applied in the
transferred. current Runtime environment.
 Simulation image:
Name of the simulation image from which
the command sequence comes.
 Command sequence name:
Name of the command sequence as saved in
the simulation image.
 Conflict handling:
The type of conflict handling depends on
how the respective command sequence is

112
Command sequences and simulation mode

transferred to the list. Depending on the


button used (Add or Overwrite), the conflict
handling is prescribed and cannot be
changed.

List can be sorted and filtered.


Remove Removes highlighted command sequence from the List
of command sequences to be applied.
Multiple selection is possible. A new assignment from
Command sequences in project simulation is possible.
OK Closes the dialog and applies project configurations from
the list of command sequences to be applied
in the command sequences editor.
Cancel Discards all changes and closes the dialog.

If the Command Sequencer module is operated in the zenon network, the following rules are
applicable:
 If the dialog is called up, the project simulation list is filled with the simulation images from the
server.
If a server is lost, the dialog with an empty project simulation list is called up.
 The command sequences in project simulation list is also filled with data from the server on the
client. The list is empty if the server is lost.

12.2 Creating a simulation image

In order to be able to create a simulation image in zenon Runtime, carry out the following steps in the
zenon Editor:
1. Create a new function:
In the toolbar or in the context menu of the Functions node, select the New function command.
The dialog to select a function is opened.
2. Select, in the dialog from the Applications group, the Activate/deactivate project simulation
function.
The dialog to configure the project simulation is opened.
3. Name the function.
4. Link the function to a button.

113
Command sequences in the zenon network

OPERATION IN RUNTIME

If the dialog is not offered in Runtime, please note that each restart of a simulation overwrites the
previous simulation image!

Information
You can find more information in the project simulation manual.
The current status is read with the system driver variable [system information]
Runtime status (simulation)

13. Command sequences in the zenon network


The Command Sequencer module is also available in the zenon network. Command sequences are
always executed on the Server in the process. Each client can execute and administer command
sequences.

If a computer works as a Client in the network, all changes to the command sequence(s) are transferred
to/from the Primary Server. If there is a Standby Server in the current network topology, all command
sequences are synchronized by the Primary Server. The Standby Server synchronizes itself automatically.

DISPLAY OF DIALOGS

If a command sequence is started by means of a function or button in the command sequences editor,
dialogs are always called up on the computer on which the command sequence was started.

These are:
 Command Processing screens
 Error message

REDUNDANCY

The Command Sequencer module supports, from zenon version 7.50, the redundant zenon network.

The following redundancy types are supported:


 Rated network
 Non-dominant network
 Dominant network

114
Command sequences in the zenon network

ZENON NETWORK

You can find further information on the configuration of redundancy in the Network manual.
 Types of redundancy
 Redundancy in a rated network
 Redundancy in a non-dominant network
 Authorization in the network
 Functions in the network

13.1 Particular aspects for the Command Processing screen

If user interaction has been configured in the Command Processing, the following is applicable:
 the Command Processing screen is automatically called up on the computer on which the
command sequence was started.
 On all other computers, the Command Processing screen can be called up by clicking on the User
interaction button.

 When executing a two-step step, a Command Processing screen is called up once there are no
more active interlockings. The Command Processing screen is either that of an action or - if no
screen has been configured there - the Command Processing screen of the command group.

13.2 Simulation images in network projects

If the Command Sequencer module is operated in the zenon network, the following rules are
applicable:
 If the dialog is called up, the project simulation list is filled with the simulation images from the
server.
If a server is lost, the dialog with an empty project simulation list is called up.
 The command sequences in project simulation list is also filled with data from the server on the
client. The list is empty if the server is lost.

115
Command sequences in the zenon network

13.3 Behavior in the zenon network

The network concept of the Command Sequencer module works according to the following principle:
 The command sequences can be configured on the client, as well as the Server or on the Standby
Server.
 The configured command sequences are administered on the Primary Server and distributed to
the clients.
 The command sequences can be operated on both the client and the Server.
 The command sequences are always executed on the Primary Server.
 With redundancy switching, the command sequences are canceled.
These can be restarted manually on the new Primary Server.

ROLE SWITCH BETWEEN SERVER 1 AND SERVER 2

 Redundancy switching is delayed until all active command sequences have been completed.
 The start of command sequences is blocked during a redundancy switching. The buttons on the
client are grayed out in this time.
 This redundancy switching can be planned in a Rated network.
 In a dominant network or a non-dominant network, redundancy switching is carried out when
the Primary Server fails.
 It is possible to start command sequences again once the switch has been carried out or if the
switch has been completed.
An entry is written to the CEL in this case.
 CEL messages are written for the following events:
 Start of a command sequence on the server is blocked.
 If a command sequence in the dominant network is to be started on the Server 2 .
 The command sequence cannot be started because there is currently a redundancy switch
pending.
 No CEL message is generated if an incorrect command sequence is started.

116
Command sequences in the zenon network

LOG ENTRY

Entry Level Description


The sequence ERRO The command sequence cannot be started because there is a
(mrid:<id1>, RS redundancy switch pending.
crid:<id2>)<name> could
not be started, because a
redundancy switch is
pending.

SPECIAL CASE: TWO SE RVERS IN THE NETWORK

In the event that, when switching the Primary Server, there are still command sequences running on the
"new" Standby Server, these are canceled on the Standby. This can only occur if both servers in the
network were no longer connected (due to a network failure for example) and are now connected again.
In this case, the change to the command sequence is not transferred to the Primary Server.

This means that, if there is a connection and command sequences that are now canceled on the Standby
have already been opened on the Primary Server, these continue to be considered as running. It can
only be restarted again once this command sequence has been closed on Server 1 and Server 2.

NO CONNECTION TO SER VER AND STANDBY

If the command sequence screen is opened on the Client when neither Server 1 nor Server 2 are
contactable, the command sequences editor on the Client is not available. The command sequence
editor remains empty. An error text is displayed in zenon Runtime instead of the command sequence
image.

117
Command sequences on the web client

ERROR DIALOG

If a command sequence cannot be started, the following error dialog is shown:

13.4 Authorization

The following rules are applicable for the Command Sequencer module with operating authorization:
 Operating authorization via Equipment model
 In principle, all interactions are permitted in the command sequencer editor.
 When a command sequence is started manually, a check is made to see whether there are
operating authorizations for all variables of the command sequence (response variable).
The command sequence is executed if this authorization is present.
 In order to be able to execute a pending user interaction, the same user authorization as for
the start of the command sequence is necessary.
 All other interactions such as stopping, renaming, etc. do not need operating authorizations
for the equipment model.
 Global operating authorization
 Each start of a command sequence and each interaction needs the corresponding operating
authorization.
 No action is executed without a valid token.

14. Command sequences on the web client


If a zenon web server with the standard license is used:
 The settings for grid and color can be changed on the zenon Web Client

118
Authorization

 No command sequences can be created or edited on the zenon Web Client


 The size of the editing area cannot be changed on the zenon Web Client
 In the toolbar, all symbols that are not permitted on the zenon Web Client are deactivated;
it is thus not possible to select the corresponding objects.

If zenon Web Server Pro is used, these restrictions do not exist.

15. Authorization
The following is applicable for operating authorizations for the Command Sequencer Command
Sequencer module:
 Global operating authorizations
The executing computer must have the corresponding operating authorization. No interactions
are permitted without the corresponding authorization.
This authorization is applicable in general for all interactions. No distinction is made for
individual content.
 Operating authorization via Equipment model.
 The start of a command sequence requires corresponding authorization for all response
variables used in the command sequence.
 A pending user interaction requires the same user authorization as for the start of the
command sequence.
 All other interactions such as stopping, renaming, etc. do not need operating
authorizations.

Information
You can find further information on authorizations in the Network manual in the
Operating authorizations in the network chapter.

16. Structure of the XML file for command sequences


Please keep in mind:

119
Structure of the XML file for command sequences

 Changes to the XML file are for experts only and are not generally recommended.
 An invalid XML file can lead to problems during XML import. The import can fail as a result.
 Due to the fact that both the Command Sequencer module and the Batch Control module use a
common XML structure, content and illustrations are the same as the terminology of the Batch
Control module. If these entries are missing in the XML file, the content is also invalid for
command sequences.

Information
This documentation of the XML file describes the elements "from top to bottom" according to
how they occur in the file. Substructures contained therein are each described in detail in
their own areas.

Main nodes

The first level of the XML structure:


Parameter Description
xml XML declaration with XML version and character coding:
version="1.0" encoding="utf-16"
Subject Please note the detailed description for the content of
this node.

SUBJECT

The Subject node contains general information on the XML file.


Parameter Description
ShortName (prescribed value)
zenOn(R) exported project
MainVersion Version of zenon from which the XML export was carried
out.
(prescribed value)
7500
Apartment Please note the detailed description for the content of
this node.

APARTMENT

The Apartment node represents content for exported command sequence project configurations.

120
Structure of the XML file for command sequences

Parameter Description
ShortName (prescribed value)
zenOn(R) command sequencer
Version Version of zenon from which the XML export was carried
out.
(prescribed value)
7500
CommandSequence Node for project configuration content of a command
sequence.
Each individual exported command sequence
configuration is represented with its own
CommandSequence node.
Please note the detailed description for the content of
this node.

COMMANDSEQUENCE

The node contains general information on the configuration of a command sequence.

121
Structure of the XML file for command sequences

Parameter Description
MrId ID of the command sequence. This ID must be unique for
each command sequence and must not be issued twice.
MrName Name of the command sequence.
Corresponds to the Name input field in the Command
sequence configuration dialog.

MrDescription Description of the command sequence.


Corresponds to the Description input field in the
Command sequence configuration dialog.

MrVersion Version of command sequence.


1

(prescribed value)
Default setting that cannot be changed.
MrSourceVersion Original version of the command sequence.
0
(prescribed value)
Default setting that cannot be changed.
MrStatus Status/mode of the command sequence.
 0
Not used
 1
Edit mode
 2
Not used
 3
Execution mode
RecipeType Type of command sequence.
Pfc
(prescribed value)
Default setting that cannot be changed.
ApprovalTime Time stamp for approved command sequences.
No entry
Is not used for the Command Sequencer module.
ApprovalUserName Name of the user who approved the command sequence.
No entry
Is not used for the Command Sequencer module.
ApprovalUserID ID of the user who approved the command sequence.
No entry

122
Structure of the XML file for command sequences

Is not used for the Command Sequencer module.


OutdatedTime Obsolete time for the command sequence.
No entry
Is not used for the Command Sequencer module.
OutdatedUserName Name of the user who set the command sequence to
obsolete.
No entry
Is not used for the Command Sequencer module.
OutdatedUserID ID of the user who set the command sequence to
obsolete.
No entry
Is not used for the Command Sequencer module.
Structure Please note the detailed description for the content of
this node.

Structure node

Each configured command sequence is represented in the XML file with the Structure_[serial number]
node.
Parameter Description
NODE Given text:
zenOn(R) embedded object
LastObjId Last-used ID of the command sequence.
ColCount Total number of columns in the command sequence grid.
RowCount Total number of rows in the command sequence grid.
CenterColOffset Start coordinates of the cell with the first element of a
command sequence configuration in the command
sequence grid.
0
(prescribed value)
CenterRowOffset Start coordinates of the row with the first element of a
command sequence configuration in the command
sequence grid.
0
(prescribed value)
ChartObject Please note the detailed description for the content of
this node.

ChartObject node

Each individual element of the command sequence grid is represented in the XML file with the
ChartObject_[serial number] node.

123
Structure of the XML file for command sequences

The respective XML elements differ depending on the element.


Parameter Description
NODE Given text:
zenOn(R) embedded object
Type Type of element.
 1
Start element
 2
End element
 3
Step
 4
Transition
 5
Begin branch
 6
End branch
 7
Begin parallel branch
 8
End parallel branch
 9
Switchgear allocation
 10
Not used for command sequences
 11
Line
 12
Jump target

16.1 XML structure for elements - complete overview

This description offers a complete overview of all possible elements.

You can find a detailed description according to elements ....

124
Structure of the XML file for command sequences

START ELEMENT

Parameter Description
NODE Given text:
zenOn(R) embedded object
TYPE Type of element.
Always 1 for start element
ChartId ID of the element in the sequence.
ChartCol Coordinates of the column of the element in the
command sequence grid.
The number relates to the free columns next to the
element.
This means: ChartCol 3 = the element is positioned in
Column 4.
ChartRow Coordinates of the line of the element in the command
sequence grid.
The number relates to the free lines above the element.
This means: ChartRow 3 = the element is positioned in
row 4.

END ELEMENT

Parameter Description
NODE Given text:
zenOn(R) embedded object
TYPE Type of element.
Always 2 for end element
ChartId ID of the element in the sequence.
ChartCol Coordinates of the column of the element in the
command sequence grid.
The number relates to the free columns next to the
element.
This means: ChartCol 3 = the element is positioned in
Column 4.
ChartRow Coordinates of the line of the element in the command
sequence grid.
The number relates to the free lines above the element.
This means: ChartRow 3 = the element is positioned in
row 4.

ELEMENT LINE

125
Structure of the XML file for command sequences

Parameter Description
NODE Given text:
zenOn(R) embedded object
TYPE Type of element.
Always 11 for line element
ChartId ID of the element in the sequence.
ChartCol Coordinates of the column of the element in the
command sequence grid.
The number relates to the free columns next to the
element.
This means: ChartCol 3 = the element is positioned in
Column 4.
ChartRow Coordinates of the line of the element in the command
sequence grid.
The number relates to the free lines above the element.
This means: ChartRow 3 = the element is positioned in
row 4.

126
Structure of the XML file for command sequences

FirstCol Coordinates of the column in which the line starts.


FirstRow Coordinates of the row in which the line starts.
SecondCol Coordinates of the column in which the line ends.
The number relates to the free columns next to the
element.
This means: ChartCol 3 = the element is positioned in
Column 4.
SecondRow Coordinates of the row in which the line ends.
The number relates to the free lines above the element.
This means: ChartRow 3 = the element is positioned in
row 4.
LineSegments Column, row, type coordinates of the cells, separated by
# where the complete line runs.
Type of line:
 0: Straight line from top to bottom
 1: 90° from the top to the right
 2: 90° from the top to the left
 3: Straight line from left to right
 4: 90° from the right to the bottom
 5: 90° from the left to the bottom

Example:
1|3|0#1|2|5#0|1|0#0|2|1

127

You might also like