34 - Sequence Control and Process Diagnosis
34 - Sequence Control and Process Diagnosis
Disclaimer
Because of the variety of uses for SICAR described in this publication, those responsible for the use of
SICAR must satisfy themselves that all necessary steps have been taken to assure that each use meets all
performance and safety requirements, including any applicable laws, regulations, codes and standards.
The illustrations, charts, sample programs and layout examples shown in this guide are intended solely for
purposes of example. Since there are many variables and requirements associated with any particular
installation Siemens does not assume responsibility or liability (to include intellectual property liability) for
Reproduction of the contents of this copyrighted manual, in whole or in part, without the written permission of
Siemens, is prohibited.
Table of contents
1. Introduction 4
4. Message block 46
4.1 Structure of the message block 46
4.2 Programming limitations for message block 48
4.3 Allowed conditions, operands and addressing 49
4.4 Representation HMI 50
4.5 Call of the message block 52
1. Introduction
This document describes the function of the sequence engine, the message block and the diagnosis screen
in the HMI.
Sequence control management of 128 sequence blocks executed in parallel, with up to 128
steps per sequence block
Organising and monitoring of the sequence for the automatic and manual mode
This sequence block has been designed for a linear structure. Branchings can be programmed.
The sequence block has two interlock levels. One for automatic and inching mode and one for
manual mode.
Per sequence block one permanent-step can be programmed, it’s conditions are valid for all steps.
Block overview:
FC986 FB1128
86
:
FB1001
: FC1128
DB1001
UC FC1003
Sequence-DB
:
The following definitions have been established for the individual sequences 1-128:
Sequence 1:
FC1001 Call of block FB1000 and command output
FB1001 Sequence block with up to 128 sequences
DB1001 Sequence management
Sequence 128:
FC1128 Call of block FB1000 and sequence output
FB1128 Sequence block with up to 128 steps
DB1128 Sequence management
The structure of the sequence with the interlocks and transitions are programmed in the sequence - FBs.
Depending on the operating mode (automatic, inching, manual) of the sequence, the sequence
administration block FB1000 processes the programmed interlocks and the transition condition, and forms
the sequence stepmarker. The actions are executed with the stepmarker stored in the sequence DB. These
actions are programmed in the sequence FC after calling FB1000.
FB 1004
L
#Sequence.Branchdistributor
JL Branchdistributor
BEU
JU
PERM
JU
S001
JU
S002 Permanentstep
:
FC 1004 JU
S00n
FB 1000 BEU: BEU
CALL FB1000,
DB1004
PERM:
Seq_cascade_no:= 4 #Sequence.ILOCK_Auto Selektive step
Waiting_time:=10
Watchdog_time:=20 #Sequence.ILOCK_no_Sync
DB1004
BEU
S001:
#Sequence.ILOCK_Auto
#Sequence.TRANS_Auto
#Sequence.ILOCK_no_Sync
„programming
actions“
BE
Example:
L #Sequence.Branchdistributor
JL BEU
JU PERM
JU S001
JU S002
JU S00n
BEU: BEU
The conditions that are not programmed are internally preset with status 1.
The step starts from the jump mark „PERM“ and ends with „BEU“ before the jump mark of the next step.
All conditions can be programmed in one network. To program the sequence in ladder diagram you also
have the possibility to program one separate network for each condition.
The results of the logic operations from the permanent step are stored in the sequence block and ANDED
with the results of the logic operations from the selective step.
Example:
Every step starts from the jump mark of the step and ends with a „BEU“ before the jump mark of the next
step.
In every step a branching and a waiting time and a watchdog time additionally can be set and called.
& ILOCK-M
Selektiv Step #Sequence.ILOCK_Manual
Example:
Manual mode
Movement-
buttons from Visu
Limit conditions
Transition
conditions
All interlock conditions (crash interlocks).for the safe execution of an action has to be programmed in the
variable #Sequence.ILOCK_Manual.
Example:
The limit manual contains the feedback signals of the actions executed at step output. If
#Sequence.LIMIT_Manual is fulfilled, the step is completed -> step output flag goes to 0bin.
Example:
The variable #Sequence.ILOCK_Auto contains all inputs of the movements to be made in this step.
They are used for interlocking and the unique synchronization of this step.
Example:
The variable #Sequence.TRANS_Auto contains the feedback of the actions executed at step output. If
#Sequence.TRANS_Auto is fulfilled, the step is completed and the step output flag becomes 0bin. In
automatic mode, the next step is enabled.
Example:
Example:
Example:
Example:
Overview:
Automatic
yes (*) yes (*) yes (*) no no
diagnostics
(Initial value
error display)
(*) After expiry of the watchdog time, the initial value error is displayed and the entry is made in the
diagnostics memory.
Manual:
>
Perm Step #Sequence.ILOCK_no_Sync
= 1
Action
Perm Schritt #Sequence.ILOCK_Auto
------------------------------------------------------------- output
Selektiv step #Sequence. LOCK_no_Sync
& ILOCK-A step n
Selektiv step #Sequence.ILOCK_Auto
Every step of a sequence contains a function. This is usually the execution of a movement (action). It must
be executed within a finite time dependent on the process. The watchdog time is used to monitor the time
taken to execute the step and if the set time is exceeded, this results in an entry (initial value) being made in
the error log memory.
The watchdog time can be set with the parameter “watchdog time“ of the FB 1000. This parameter states the
general watchdog time for all steps of the sequence. If another time span is needed for a definite step, in the
network of the step, Sequence.TWD_Setpoint (DBW16) in the sequence work-DB has to be set to the
appropriate value. The time value is calculated by multiplying the constant in #Sequence.TWD_Setpoint with
the value of the clock pulse (e.g.20*pulse(100ms) =2 sec).
A watchdog error will not prevent Interlock. If you want to prevent interlock in case of a watchdog error, the
variable #Sequence.TWD_Error (DBX9.4) has to be programmed in the interlock. The scan can be
programmed in every step of the sequence. This bit depends on the sequence, i.e. the status is assigned
anew for each sequence and every step
Example: Step with scan of the watchdog time and watchdog time referring to the step
The watchdog time can be stopped with the varible #Sequence. TWD_Stop. The signal has no influence on
the step output.
The particularity of the step “waiting” is based on the simultaneous assignment of #Sequence.TWD_Stop
and #Sequence.TRANS_Auto
The variable #Sequence.SET_Error makes it possible to trigger a diagnosis independent from the watchdog
time value.
A waiting time that has not yet expired will not prevent enabling of the next step. If a step is not to be enabled
until after the waiting time, the variable #Sequence.TWA_Active must be programmed in the Transition. The
scan can be programmed in every step of the sequence. This flag depends on the sequence, that is, it is
regenerated for every sequence and every step.
Scan of #Sequence.TWA_Active in the Transition can be used to delay step enabling, e.g. for masking out
"bouncing" signals (steadying time)
Example: step with scan of waiting time and waiting time referring to the step
The waiting time can be stopped with the variable #Sequence. TWA_Stop. The signal has no influence on
the sequence output.
Example: Waiting time should only become active if command release is fulfilled
Example:
The next step to be executed is set dependent on the status of flag M 600.2:
Note: The branching address will be loaded independently from the status in #Sequence.TRANS_Auto.
In general the verification should only be processed after the Transition in M3.3 are performed.
Programming possibilities:
Example 1: Current step must always be finished -> #Sequence.Hold_in_Step_n = 255 in permanent
sequence
Example 2: If the sequence is in step 3, continue until step 5, otherwise stop immediately
Step Perm
Step: 3
Step: 4
Note:
In case that the watchdog time = 0 the sequence will stop immediately independent from
the value of the variable #Sequence.Hold_in_Step_n.
OM Manual
#Sequence.ILOCK_Manual
&
#Sequence.LIMIT_Manual
#Sequence.ILOCK_no_Sync
#Sequence.EXT_Sync
&
#Sequence.EXT_INT
#Sequence.TRANS_Auto
Description of parameter:
Instance DB: The FB1000 requires a data block (sequence DB) for each sequence block
The sequence DB is generated as instance DB when call to FB1000.
Waiting_time: Time value for waiting time (waiting_time *100ms), valid for all
(Waiting time) steps of this sequence, unless it was not redefined in the steps of the
sequence block.
There is a strict connection between the sequence No. and the blocks:
In the simplest case, the outputs are actuated by assigning the step memory to the output.
STL LAD
ON <Operand> <Operand>
AN <Operand> <Operand>
O(
A(
O <Operand>
A <Operand>
= <Operand> <Operand>
=
S <Operand> <Operand
S
R <Operand> <Operand>
Important:
Not allowed / not supported conditions, operands or addressing will be representate in diagnosis
view on HMI with following special characters:
$ = no Bitoperations like L, T, …etc.
$$ = Bitoperations like X, XN,… etc
$$$ = Addressing 8192.0 or higher
$$$$ = Jump / Label
$$$$$ = Timer, Counter
All thise special characters will be shown in LAD with following graphical element without animation:
?
„Missing Conditions“ disabled on HMI all viewing of not allowed conditions
To get the step information on the right side of the sequence diag screen the information about the step must
be written in the network with the jump label. (Max. 40 Character)
To design the step commentaries dependent on the respective language they can set in the network
commentary by adding a key word. The key word is composed of „title“ and „language“ (the language
denotation exactly has to correspond with one of the languages that can be chosen at the „HMI“ in the
system screen):
How to activate an additional language for WinCC flexible can be found in Chapter “3.1 Initialization and
Operation modes”
In the message blocks or sequence blocks you have to use the key words “Title_other” for the 3rd language.
The parameters ‘automatic mode’, ‘inching mode’ and ‘manual mode’ serve to pre-set the operation mode of
the sequence. With ‘Start’ the operation mode is activated. If the parameters are not unequivocal, no
operation mode will be set, e.g. if automatic and manual mode are selected at the same time. If no operation
mode is activated, the sequence has the operation mode ‘off’.
If inching mode is active, this command will be stored after a positive edge change of the request for a
transition (step +1), until the transition has been made to the next step or the operation mode has been
changed. The inching mode does not differ otherwise from automatic mode. Inching mode might be viewed
as a curbed automatic mode.
With this parameter it is possible to reset a watchdog time error. The reset will be done with the negative
edge of the bit “explicit acknowledgement”.
If this parameter is preset with “1” the step enabling will be blocked while watch dog time error occurs.
The step output signal will not be influenced. Therefore the bit #Sequence.TWD_Error has to be
programmed to the ILOCK-A.
OM: Pulse
The bit ‘pulse’ is used as a timer clock pulse for watchdog time and waiting time. If either of these times are
used, you have to set a parameter for the clock pulse.
OM: Synchronization
With this parameter you can start the synchronization. If no operation mode has been set (operation mode
‚off‘) and a synchronization is required, all steps are tested whether they are executable in automatic mode,
as far as they are not skipped over by a branching. With the synchronization the branchings are executed,
too.
OM-OFF
#Sequence.ILOCK_Auto
executable
&
#Sequence.EXT_SYNC
#Sequence.TRANS_Auto
If one step is unequivocally found, the sequence will be set to this step (synchronised). After changing to
the automatic mode the sequence is continued in this step.
#Sequence. First_sync_Step (DBB28) 1. founded step if more than one step was
found
#Sequence. Second_sync_Step (DBB29) 2. founded step if more than one step was
found
S
step 1
R
step 1
transition
S
step 2
R
step 2
transition
S
step 3
R
step 3
transition
4. Message block
FB1001
Network : n
Emergency Stop
A Mx.y
FC1001 =message_no1
***
Network: n+1
Protection Door
CALL FB1001, D B1001 A M x.z
=message_no2
***
DB1001
FC1000
CALL FC1000
Message_DB:=1001
Messages and information which is not logged using the sequence can be programmed in the message
modules.
The message module must be programmed as an FB within the number range from FB1001 to FB1128.
FC1000 ‘message analysis’ must be called from the message module.
The message number is programmed using the symbol variabel “#message.no_”+ message number
(#message.no_1...512).
The namimg on the left side of the sequence diag screen must be written in the Title of the respective FB.
To design the step commentaries dependent on the respective language they can be set in the network
commentary by adding a code word. The code word is composed of „title“ and „language“ (the language
denotation exactly has to correspond with one of the languages that can be chosen at the „HMI“ in the
system screen):
In order to benefit from multilingual functionality for the message text, they can be entered with a
keyword in the network comment. The keyword is made up as follows: “Title_” and language (the
language name must agree exactly with one of the languages which can be selected from the HMI).
allowed
=
following
the rule
not allowed
AN <Operand> <Operand>
O(
A(
O <Operand>
A <Operand>
= <Operand> <Operand>
=
S <Operand> <Operand
S
R <Operand> <Operand>
Important:
Not allowed / not supported conditions, operands or addressing will be representate in diagnosis
view on HMI with following special characters:
$ = not Bitoperations like L, T, …etc.
$$ = Bitoperations like X, XN,… etc
$$$ = Addressing 8192.0 or higher
$$$$ = Jump / Label
$$$$$ = Timer, Counter
For every special character following LAD-Grafic will be shown without animation in the logic:
?
not allowed instanz data bit (DIX) view condition without addressing
Button „Missing Conditions“ disable on HMI all viewing of not allowed conditions
In the left section the existing sequence- / message blocks are displayed.
In the right section the detail diagnosis of the block selected on the left is presented.
By pressing the Zonebuttons Z1…….Z8 you will see only the sequence / message blocks
belonging to the selected zone
If no Button is pressed all sequences / message blocks are indicated.
The number of Buttons are shown depends on the activated zones in the PLC and works
automatically.
Function buttons
These buttons are used to navigate the cursor in the left or right field
Line up, Line down -> one line up / down
Page up, Page down -> 16 lines up / down
The individual sequence background colors show the operating mode and has the following significance:
Per zone one primary fault is indicated, means the first fault which appears in this zone.
All other faults in this zone, appearing after a primary fault, are secondary faults and displayed in dark red
colour.
If a sequence has a fault, the button shows the kind of fault like PERM, ILOCK or TRANS is missing.
Sequence block
Depending on the active operation mode the assignments of ILOCK / TRANS conditions of the actual step
are indicated on the HMI.
With the buttons in the footer you can select which part of the sequence you want to see:
ILOCK = show only Interlock conditions
TRANS = show only Transition conditions
PERM = show only Permanent step consitions
Missing conditions = show only Missing conditions
The missing conditions are shown with a red sqare on the left side.
Diagnosis buttons:
Missing Conditions = view only missing conditions except all special codes
LAD View = change view to LAD
Navigation button:
Line UP = scroll view one Line Up
Page UP = scroll view one Page Up
Line DN = scroll view one Line Down
Page DN = scroll view one Page Down
The headline shows for one certain LAD element the respective information from the symbolist, here I5.5
By touching another LAD element on the screen whose information are shown in the headline.
Change LAD view for operands between absolute and symbolic representation
control with “DB_Param” (DB940). DBX 22.4
Diagnosis button:
Missing Conditions = view only missing conditions except all special codes
STL View = change view to STL
Navigation button:
Cn Left = scroll view one Column Left
Cn Right = scroll view one Column Right
Line UP = scroll view one Line Up
Page UP = scroll view one Page Up
Line DN = scroll view one Line Down
5.2.5 Inching
In inching mode (sequence engine executed automatic conditions) you can control sequence blocks step by
step by using the buttons Inch-S and Inch-A.
To proceed Inching you have to activate inching mode for the appropriate Zone in the operating mode
screen.
A sequence which is in Inching mode is indicated in dark green colour.
5.2.6 Synchronisation
Possible results:
No step found
No diagnostics white
Error red
If the cursor is placed on the left side on a message block, an overview of the messages programmed are
displayed on the right side of the screen.
The message texts are displayed corresponding to the network comments of the S7-block.
All messages with an error are red highlighted.
Example: no diagnostics
Example: Error
Diagnosis buttons:
Missing Conditions = view only missing conditions except all special codes
LAD View = change view to LAD
Navigation button:
Line UP = scroll view one Line Up
Page UP = scroll view one Page Up
Line DN = scroll view one Line Down
Page DN = scroll view one Page Down
Change LAD view for operands between absolute and symbolic representation
control with “DB_Param” (DB940). DBX 22.4
Diagnosis button:
Missing Conditions = view only missing conditions except all special codes
STL View = change view to STL
Navigation button:
Cn Left = scroll view one Column Left
Cn Right = scroll view one Column Right
Line UP = scroll view one Line Up
Page UP = scroll view one Page Up
Line DN = scroll view one Line Down
Page DN = scroll view one Page Down
Select from the list in the left window all sequence- / message blocks (FB1001 - 1128) and move it to the
right window by using the arrows.
It is important to note that you have to select “Absolute” in the field “Addresses”.
Press “OK”.
In the container ‘Sources‘ select the newly created source with the right mouse button and execute the
function “Export source”. Export the Source e.g. to a USB-Stick for a transfer to the Multi-Panel or PC.
Mandatory:
The file must have the same name as the project subfolder e.g.“Project_1.s7l”.
To have the chance to use different projects it is necessary to create project subfolders
In the case of languages such as Chinese, which has a huge character set with tens of thousands of
characters, a 16-bit, or two-byte, character code is employed. A two-byte character code allows for up to
65,536 items to be encoded (2^16 = 65,536 code points) (Unicode)
E.g. Storage medium: \Storage Card MMC\ or \flash\ or other removable medium
E.g. Storage Path: SICAR\Project_x
By pressing the button “Init Diag” the source file is prepared automatically for the use in the diagnosis
screen.
6.2.2 PC
The generated source file must be stored on C:\SICAR\Projectname
By pressing the button “Init Diag” the source file is prepared automatically for the use in the diagnosis
screen.
On this reason there are 3 additional steps necessary to generate the information of the diagnosis screen.
Step 1:
The exported sourcefile from Step7 must be stored as an Unicode-file.
Open the sicar_sample.s7l with the Microsoft Notepad.
Select in the menu bar “File”, “Save as”
Step 2:
On the SICAR-CD a file-extractor is located, “S7L_Extractor.exe”
Copy this exe-file to your engineering station with the WinCC flexible engineering software.
Start the file-extractor “S7L_Extractor.exe”.
Select the “S7 Source”, means the folder with the generated Step 7 source file.
Select the “Target Folder”. The “S7L_Extractor” generate the necessary txt-files for the multi panel and a
csv-file for the import into WinCC flexible.
Press the button “Go” to generate the files. Wait till you see information “Process finished”.
Step 3:
Open your current WinCC flexible project.
Select csv-import.
In the Text List a new Entry with the name “Chinese Textlist” is generated. This textlist contains all the
Chinese characters of the Step7 Source file.
Step4:
All generated txt-files of the “S7L_Extractor” in the directory D:\TEMP\S7l Source\Generated files must be
stored onto a USB-Stick, CF-card or MMC-card on the Multi panel.
The storage medium and storage path must be specified on the Multi panel in the System screen.
E.g. Storage medium: \Storage Card MMC\ or \flash\ or other removable medium
E.g. Storage Path: SICAR\Project_x
It´s mandatory to activate the “Unicode-Format” check mark.
With the button “Save Settings” the information about the storage medium, storage path and file format is
saved.
The Init-Diag button is hidden, due to the fact that the informations for the diagnosis screen are already
generated by the S7 Extractor.
6.3.2 PC
Note:
To display and to work with Unicode languages it is necessary to install this language in your operating
system.
E.g. Chinese, you have to install files for east asian languages.
Start / Settings / Control Panel / Regional and Language Settings /
Tab: Languages
Mark Checkbox “Install files for east asian languages”
Step1:
The exported sourcefile from Step7 must be stored as an Unicode-file.
Open the sicar_sample.s7l with the Microsoft Notepad.
Select in the menu bar “File”, “Save as”
Step2:
Transfer the sourcefile to the PC and place it in C:\SICAR.
Step3:
By pressing the button “Init Diag” the source file is prepared automatically for the use in the diagnosis
screen.
Installation “SICARGen”
Start “Setup.exe” from 30_Software/Tool/SICAR-Gen and follow the instructions
Tool actions:
1. Generate and export from Step7 a sourcefile of FB1001 – FB1128 and the symbollist.
2. Export from WinCC flexible three certain textlists in XML-format.
3. Analysing the sourcefiles and symbolist from Step7
4. Generating DB´s in Step 7 with diagnosis information
5. Generate Textlists and import into WinCC flexible
User action:
Download new generated DB´s (Default: DB1301 – DB 1428) into the PLC.
Download WinCC flexible project to target device.
An integrated WinCC flexible project is automatically detected and shown in 4 “WinCC flexible Project”
2. You can also select the S7-project with the “Storage path” using this button
An integrated WinCC flexible project is automatically detected and shown in 4 “WinCC flexible Project”
5. Language Symbolic
This setting depends on your language concerning the symbolist in Step 7.
SICARGen creates the textlists in WinCC flexible depending on this setting.
6. Codepage Symbolic
For the use with Unicode languages
7. Start-FB, Start-DB
Start-FB: FB1001 and the next 127 blocks. No change possible
That’s the FB´s which must be evaluated by the Tool, means all sequence and message blocks.
Here you can change the DB. The new value has to be changed also in the PLC DB940.DBW6, because
that´s the information for the HMI.
8. Folder Output
In this folder the Tool stores all relevant information about the last generation.
10. Start
With the Start button the generation will be started.
In the right window you get the information about the ongoing work steps.
10. Languages
Here you can select the language of the user interface.
6. Press “Start” and the Tool generates the both Targetfiles DB and XML
Download new generated DB´s (Default: DB1301 – DB 1428) into the PLC.