Write each machine's sequence with a step number and a wait code (SCL CASE), add a step watchdog and a transition pulse (ladder), load the sequence DBs as a WinCC structure type, show step and wait code through text lists on one overview screen, and archive the step tag on change so step durations can be analysed.
- Step and wait code come from the PLC; WinCC turns them into text.
- One structure type, one row per machine.
- Archive transitions to find where time is lost.
Designing the Overview Screen
One row per machine: name, step text, blocking condition, step time against its limit, cycle count. Colour only for abnormal (a timeout), as in HMI screen design best practices. A click on a row opens the detail screen of that machine.
Lab Flow: From Station Sensors to a Line Overview
Every lesson in the Softwell PLC lab manual series follows the same six stages and the same address rule, so the code you write here plugs straight into the HMI lessons.
Stage 1Field Wiring and PLC Tags
| PLC tag | Address | Type | Device / comment |
|---|---|---|---|
M1_PartPresent | %I9.0 | Bool | Station 1 part sensor |
M1_Clamped | %I9.1 | Bool | Station 1 clamp closed |
M1_Done | %I9.2 | Bool | Station 1 process complete |
M2_* (same three) | %I9.3 .. %I9.5 | Bool | Station 2 |
Stage 2Input Mapping into DB_IO
// FC_InputMapping "DB_IO".M1_PartPresent := "M1_PartPresent"; "DB_IO".M1_Clamped := "M1_Clamped"; "DB_IO".M1_Done := "M1_Done";
Station 2 is mapped the same way.
Stage 3PLC Logic in Ladder and SCL
The same logic in SCL – use whichever your plant standard prefers; both write the same DB members that WinCC reads:
// FB_SeqM1 – CASE sequence with wait codes (see the TIA lessons for the full pattern)
#T_Step(IN := #Step = #StepOld, PT := #StepMax);
"DB_SeqM1".StepChanged := #Step <> #StepOld; // ladder network 1 uses this
#StepOld := #Step;
CASE #Step OF
10: IF NOT "DB_IO".M1_PartPresent THEN "DB_SeqM1".Wait := 1; ELSE #Step := 20; END_IF;
20: IF NOT "DB_IO".M1_Clamped THEN "DB_SeqM1".Wait := 2; ELSE #Step := 30; END_IF;
30: IF NOT "DB_IO".M1_Done THEN "DB_SeqM1".Wait := 3; ELSE #Step := 10; END_IF;
END_CASE;
"DB_SeqM1".Step := #Step;
"DB_SeqM1".MachineStep := #Step = 20 OR #Step = 30;
"DB_SeqM1".Timeout := (#T_Step.Q AND "DB_SeqM1".MachineStep) OR ("DB_SeqM1".Timeout AND NOT "DB_SeqM1".Cmd_Reset);The complete pattern with hold, abort and recovery is in PLC step sequences.
Stage 4Link PLC Tags to WinCC: Structure Type
In Tag Management add the SIMATIC S7-1200, S7-1500 Channel, create a connection with the CPU IP address, then use AS Symbols to load the PLC symbols and drag the DB members you need into a tag group. The DB members must have Accessible from HMI ticked in TIA Portal. Names and menus can differ slightly between WinCC versions.
Create a structure type Seq with elements Step, Wait, StepTime, Timeout and Cycles, then instances M1 and M2 addressed to DB_SeqM1 and DB_SeqM2. A new machine is one more instance.
Stage 5Text Lists, Overview Screen and Step Archive
| # | Object | Properties | Tag / event |
|---|---|---|---|
| ① | Text list objects (per row) | Step: 10 Load part, 20 Clamp, 30 Process; Wait: 1 part present, 2 clamped, 3 process done | M1.Step, M1.Wait |
| ② | I/O field step time | Output, 99.9 s; background red via dynamic on Timeout | M1.StepTime, M1.Timeout |
| ③ | Row repeated per machine | Faceplate or copied group with instance tags | M2.* |
| ④ | Tag Logging | Step tags archived on change | Archive PVA_Steps |
| ⑤ | OnlineTableControl | Step history with timestamps | PVA_Steps |
The panel version is in HMI sequence status screen.
Stage 6Perform and Test: Two-Machine Sequence Overview
Two stations run their sequences. The overview screen shows step text, blocking condition, step time and cycles; the history table is what the step-transition archive keeps. Jam a station and read the cause from the screen.
| Machine | Step | Blocking condition | Step time | Cycles |
|---|
| Time | Machine | Transition | New step |
|---|
Troubleshooting
| Symptom | Likely cause | First check |
|---|---|---|
| Step shows a number, not text | Text list missing that value | Text list assignments |
| Wrong machine shown | Instance tag mix-up | Structure instance addressing |
| History empty | Step not archived on change | Tag Logging settings |
Hands-On Lab: Build a Two-Machine Sequence Overview
Hands-on- TIA Portal and WinCC Explorer V8.1
- Estimated time: 90 minutes
Wire and declare the station sensors
Declare part present, clamped and done for each station.
Map into DB_IO
Copy the sensors per station.
Write the sequence and watchdog
FB_Seq in SCL with wait codes; watchdog and log pulse in ladder.
Create the WinCC structure type and tags
Structure type Seq with Step, Wait, StepTime, Timeout, Cycles; instances M1, M2.
Build the overview screen and archive
Text lists for step and wait, one row per instance; Tag Logging on change for Step.
Test with a jam
Jam one station and read the cause and the history.
From one screen you can say which machine stopped, in which step, waiting for what, and since when.
Frequently asked questions
How do I show a step number as text in WinCC?
Use the Text list smart object (or an I/O field with a text list) connected to the step tag, with one assignment per step number. Number steps in tens so the list can grow without renumbering.
How do I show what a step is waiting for?
Let the PLC write a wait code per step and display it through a second text list. The condition is evaluated where it is known – in the PLC.
How can I analyse where a machine loses time?
Archive the step tag on change in Tag Logging, or log each transition with a timestamp, then evaluate step durations in a table control or an SQL report.
Why a step watchdog in the PLC rather than in WinCC?
The PLC knows exactly when a step starts and runs every scan; WinCC would only see what it reads at its acquisition cycle. WinCC displays and archives the result.
Should the sequence be written in SCL or ladder?
The CASE sequence is clearer in SCL; the watchdog and the logging pulse are clear in ladder. Both are shown, and both write the same DB members.
Can one screen show many machines?
Yes. Use a structured tag type for the sequence interface and one row or faceplate per instance, so adding a machine is adding an instance.