A sequence status screen shows the active step number and name, the condition the step is waiting for, the step time against a watchdog limit, and cycle data. In TIA Portal, write the step, a wait code and the step time from the sequence FB into an HMI interface DB, map step and wait code to text lists on the panel, and highlight the active step with an appearance animation.
- "Waiting for B5 slide bottom" beats "Step 30" – always publish what the step is waiting for.
- Give machine-driven steps a watchdog so a stuck step becomes an alarm, not silence.
- Number steps in tens and keep step names in one text list shared by PLC comments and HMI.
Why a Sequence Status Screen Matters
Most machines run as a step sequence: clamp, drill down, drill up, unclamp, repeat. When such a machine stops without an alarm, it is almost always waiting in a step for a condition that never comes – a sensor that did not switch, a cylinder that did not reach its end, a part that was not loaded. Without a sequence screen, finding that condition means opening the PLC program online. With a good sequence screen, the operator reads it directly: Step 30 DRILL DOWN – Waiting: slide at bottom (B5) – 9.2 / 8.0 s.
What the Sequence Screen Must Show
| Element | Why |
|---|---|
| Active step number and name | Where the machine is in its cycle |
| Waiting-for text | The exact transition condition that is missing, named by sensor or command |
| Step time against a watchdog | Shows whether the wait is normal or too long; raises an alarm when exceeded |
| Step chain overview | Context: which steps are done and what comes next |
| Last cycle time and part count | Performance at a glance and a first hint of slow cylinders or blunt tools |
| Mode and commands | AUTO / STEP, START, STOP at end of cycle, RESET, NEXT for commissioning |
The screen is a Level 2 display in the HMI display hierarchy, and follows the same grey-when-normal colour rules.
Example: Drilling Station Sequence
A simple drilling station clamps a part, drills it with a vertical slide and releases it. The sequence has seven steps; four of them are driven by the machine and get a watchdog time, three wait for the operator or for home position and have none.
| Step | Name (text list TL_Step) | Outputs active | Transition to next step | Wait code | Watchdog |
|---|---|---|---|---|---|
| 0 | INIT – home position | All outputs off | B4 slide top AND B3 clamp open | 1 / 2 | – |
| 10 | READY – wait for start | All outputs off | START latched AND B1 part present | 3 / 4 | – |
| 20 | CLAMP | Y1 clamp close | B2 clamp closed | 5 | 3 s |
| 30 | DRILL DOWN | Y1, K2 drill motor, Y2 slide down | B5 slide bottom | 6 | 8 s |
| 40 | DRILL UP | Y1, K2, slide up | B4 slide top | 7 | 6 s |
| 50 | UNCLAMP | Y1 off | B3 clamp open | 8 | 3 s |
| 60 | COMPLETE – remove part | All outputs off; count cycle | NOT B1 part removed | 9 | – |
Station I/O
The station follows the same IO mapping rule as the alarm lesson: %I only in FC_InputMapping, %Q only in FC_OutputMapping.
| PLC tag | Address | Device | DB_IO / output |
|---|---|---|---|
B1_PartPresent | %I3.0 | Inductive sensor, part in fixture | DB_IO.B1_PartPresent |
B2_ClampClosed | %I3.1 | Cylinder reed switch, clamp closed | DB_IO.B2_ClampClosed |
B3_ClampOpen | %I3.2 | Cylinder reed switch, clamp open | DB_IO.B3_ClampOpen |
B4_SlideTop | %I3.3 | Limit switch, slide top | DB_IO.B4_SlideTop |
B5_SlideBottom | %I3.4 | Limit switch, slide bottom (drill depth) | DB_IO.B5_SlideBottom |
Y1_Clamp | %Q1.0 | Monostable valve, 1 = clamp closed | from DB_SeqOut.Y1_Clamp |
Y2_SlideDown | %Q1.1 | Monostable valve, 1 = slide down | from DB_SeqOut.Y2_SlideDown |
K2_Drill | %Q1.2 | Drill motor contactor | from DB_SeqOut.K2_Drill |
PLC Side: DB_Seq Interface and FB_DrillSeq
Create a global data block DB_Seq as the HMI interface: Step (Int), WaitCode (Int), StepTime_s and StepMax_s (Real), CycleTimeLast_s (Real), CycleCount (DInt), Mode_Auto (Bool), the command bits Cmd_Start, Cmd_StopEOC, Cmd_Reset, Cmd_Next (Bool) and Alarms (Word). Outputs go to DB_SeqOut. Then write the sequence as an SCL function block with a CASE statement:
// FB_DrillSeq – called in OB1 after FC_InputMapping, before FC_OutputMapping
// STAT: Step, StepOld, Wait : Int; StartReq, StopReq, NextOld, Go : Bool;
// StepMax : Time; tStep, tCycle : TON_TIME;
// ---- step timer: restarts on every step change and on RESET
#tStep(IN := (#Step = #StepOld) AND NOT "DB_Seq".Cmd_Reset, PT := T#1H);
#tCycle(IN := #Step >= 20, PT := T#1H);
#StepOld := #Step;
// ---- commands
IF "DB_Seq".Cmd_Reset THEN "DB_Seq".Alarms.%X0 := FALSE; END_IF;
IF "DB_Seq".Cmd_Start THEN #StartReq := TRUE; #StopReq := FALSE; END_IF;
IF "DB_Seq".Cmd_StopEOC THEN #StopReq := TRUE; END_IF;
#Go := ("DB_Seq".Mode_Auto OR ("DB_Seq".Cmd_Next AND NOT #NextOld))
AND NOT "DB_Seq".Alarms.%X0; // no transition while timed out
#NextOld := "DB_Seq".Cmd_Next;
// ---- sequence
#Wait := 0;
CASE #Step OF
0: // INIT – home position
IF NOT "DB_IO".B4_SlideTop THEN #Wait := 1;
ELSIF NOT "DB_IO".B3_ClampOpen THEN #Wait := 2;
ELSE #Step := 10;
END_IF;
10: // READY
IF #StopReq THEN #StartReq := FALSE; #StopReq := FALSE; END_IF;
IF NOT #StartReq THEN #Wait := 3;
ELSIF NOT "DB_IO".B1_PartPresent THEN #Wait := 4;
ELSIF NOT #Go THEN #Wait := 10;
ELSE #Step := 20;
END_IF;
20: // CLAMP
IF NOT "DB_IO".B2_ClampClosed THEN #Wait := 5;
ELSIF NOT #Go THEN #Wait := 10;
ELSE #Step := 30;
END_IF;
30: // DRILL DOWN
IF NOT "DB_IO".B5_SlideBottom THEN #Wait := 6;
ELSIF NOT #Go THEN #Wait := 10;
ELSE #Step := 40;
END_IF;
40: // DRILL UP
IF NOT "DB_IO".B4_SlideTop THEN #Wait := 7;
ELSIF NOT #Go THEN #Wait := 10;
ELSE #Step := 50;
END_IF;
50: // UNCLAMP
IF NOT "DB_IO".B3_ClampOpen THEN #Wait := 8;
ELSIF NOT #Go THEN #Wait := 10;
ELSE
"DB_Seq".CycleTimeLast_s := DINT_TO_REAL(TIME_TO_DINT(#tCycle.ET)) / 1000.0;
"DB_Seq".CycleCount := "DB_Seq".CycleCount + 1;
#Step := 60;
END_IF;
60: // COMPLETE – operator removes the part
IF "DB_IO".B1_PartPresent THEN #Wait := 9;
ELSE #Step := 10;
END_IF;
ELSE
#Step := 0;
END_CASE;
// ---- watchdog per step (0 = no watchdog for operator-driven steps)
CASE #Step OF
20, 50: #StepMax := T#3S;
30: #StepMax := T#8S;
40: #StepMax := T#6S;
ELSE #StepMax := T#0S;
END_CASE;
IF #StepMax > T#0S AND #tStep.ET > #StepMax THEN
"DB_Seq".Alarms.%X0 := TRUE; // HMI discrete alarm: step timeout
END_IF;
// ---- outputs (written to DB_SeqOut, mapped to %Q in FC_OutputMapping)
"DB_SeqOut".Y1_Clamp := #Step >= 20 AND #Step <= 40;
"DB_SeqOut".Y2_SlideDown := #Step = 30;
"DB_SeqOut".K2_Drill := (#Step = 30 OR #Step = 40) AND NOT "DB_Seq".Alarms.%X0;
// ---- publish status for the HMI
"DB_Seq".Step := #Step;
"DB_Seq".WaitCode := #Wait;
"DB_Seq".StepTime_s := DINT_TO_REAL(TIME_TO_DINT(#tStep.ET)) / 1000.0;
"DB_Seq".StepMax_s := DINT_TO_REAL(TIME_TO_DINT(#StepMax)) / 1000.0;
- Step timer:
IN := Step = StepOldis false for exactly one scan after every step change, soETalways shows time in the current step. RESET also restarts it, so a cleared timeout does not trip again immediately. - Wait code: each step checks its conditions in order and writes the number of the first missing one. That single integer becomes the waiting-for text on the panel.
- Watchdog: only machine-driven steps have one; operator steps such as loading a part would otherwise raise false alarms.
- STOP at end of cycle: the request is only acted on in step 10, so a part is never left half-drilled.
- Interlocks: in a real machine, add the collective fault from the permissive and interlock logic to
#Goand to the outputs.
HMI Side: Tags, Text Lists and the Sequence Screen
Drag DB_Seq into the HMI tag table, then create two text lists: TL_Step with the step names from the step table and TL_Wait with the wait codes below. Add one discrete alarm on DB_Seq_Alarms bit 0 with the text "Drilling station: step timeout" and an output field for the step number in the alarm text.
| HMI tag | Type | PLC member | Used by |
|---|---|---|---|
DB_Seq_Step | Int | "DB_Seq".Step | Step boxes ①, step number and text ② |
DB_Seq_WaitCode | Int | "DB_Seq".WaitCode | Waiting-for field ③ |
DB_Seq_StepTime_s, DB_Seq_StepMax_s | Real | "DB_Seq".StepTime_s, .StepMax_s | Step time bar and text ④ |
DB_Seq_CycleTimeLast_s | Real | "DB_Seq".CycleTimeLast_s | Last cycle ⑤ |
DB_Seq_CycleCount | DInt | "DB_Seq".CycleCount | Cycle count ⑥ |
DB_Seq_Mode_Auto | Bool | "DB_Seq".Mode_Auto | Mode text ⑦, AUTO/STEP button ⑪ |
DB_Seq_Cmd_Start, _Cmd_StopEOC, _Cmd_Reset, _Cmd_Next | Bool | "DB_Seq".Cmd_… | Buttons ⑧ ⑨ ⑩ ⑫ |
DB_Seq_Alarms | Word | "DB_Seq".Alarms | Discrete alarm, bit 0 = step timeout |
| WaitCode | Text list TL_Wait |
|---|---|
| 0 | Transition in progress |
| 1 | Waiting: slide at top (B4) |
| 2 | Waiting: clamp open (B3) |
| 3 | Waiting: START command |
| 4 | Waiting: part present (B1) |
| 5 | Waiting: clamp closed (B2) |
| 6 | Waiting: slide at bottom (B5) |
| 7 | Waiting: slide at top (B4) |
| 8 | Waiting: clamp open (B3) |
| 9 | Waiting: part removed (B1) |
| 10 | Waiting: NEXT (step mode) |
| # | Object | Key properties | Tag / event |
|---|---|---|---|
| ① | 7 rectangles + text fields Step_00 … Step_60, 72 × 44 px at y 60 | Appearance animation, type Range on the step number: value = this box's step → fill #334155, text white; other values → white fill | DB_Seq_Step |
| ② | Output field (step number) + symbolic I/O field (step name) | Symbolic field mode Output, text list TL_Step, 20 px bold | DB_Seq_Step |
| ③ | Symbolic I/O field 520 × 30 px | Mode Output, text list TL_Wait | DB_Seq_WaitCode |
| ④ | Bar (or rectangle with horizontal size animation) + red limit line + output field | Bar with process value = step time and maximum = watchdog of the active step (if your panel version cannot link the maximum to a tag, use a fixed 10 s scale and place the red line with a movement animation); text "x.x / y.y s" | DB_Seq_StepTime_s, DB_Seq_StepMax_s |
| ⑤ ⑥ ⑦ | Output fields | Last cycle format 99.9 s; count with thousands separator; mode via text list AUTO / STEP | Tags above |
| ⑧ | Button START | Authorisation: Operator | Press: SetBit, Release: ResetBit DB_Seq_Cmd_Start |
| ⑨ | Button STOP END OF CYCLE | Finishes the current part, then stops in step 10 | Press/Release on DB_Seq_Cmd_StopEOC |
| ⑩ | Button RESET | Clears the step timeout after the cause is fixed | Press/Release on DB_Seq_Cmd_Reset |
| ⑪ | Button AUTO / STEP | Text from mode; authorisation: Maintenance | Click: InvertBit DB_Seq_Mode_Auto |
| ⑫ | Button NEXT STEP | Visible / operable only in STEP mode (visibility animation on Mode_Auto = 0) | Press/Release on DB_Seq_Cmd_Next |
Header, alarm line and navigation come from the screen template, built exactly as in Build the same HMI screens in TIA Portal. Button behaviour and status lamps are covered in HMI buttons, lamps and auto/manual mode.
Interactive Simulator: Drilling Station Sequence and Status Screen
The station on the left is animated from the same logic as FB_DrillSeq; the panel on the right is the sequence status screen. Load a part, press START and watch the step boxes, the waiting-for text and the step time bar. Then inject a fault and see how the screen tells you exactly where the machine is stuck.
Diagnosing a Stopped Machine with the Sequence Screen
| What the screen shows | Meaning | First check |
|---|---|---|
| Step 30, Waiting: slide at bottom (B5), time bar past the red line, step timeout alarm | Slide did not reach depth in 8 s | Drill blunt or feed too slow, slide jammed, B5 limit switch misaligned or wire broken |
| Step 20, Waiting: clamp closed (B2), timeout | Clamp valve switched but sensor not seen | Air pressure, clamp cylinder, B2 reed switch position on the cylinder |
| Step 10, Waiting: part present (B1) | Machine is ready, nothing to do | Load a part; if a part is loaded, check B1 sensing distance |
| Step 0, Waiting: slide at top (B4) | After power-up the slide is not home | Jog the slide up in manual mode, check B4 |
| Step 60, Waiting: part removed (B1) | Cycle finished, operator has not unloaded | Remove the part; if removed, B1 is stuck ON |
| Step changes but cycle time keeps increasing | Long operator waits in step 10 are counted | Cycle time is measured from step 20 only; check the timer condition |
Combine the sequence screen with a trend of cycle time over the shift to see tools wearing or cylinders slowing down; see HMI trends and data logs. For CPU-level diagnosis, use the diagnostic buffer and watch tables.
Hands-On Lab: Build the Drilling Station Sequence Status Screen
Hands-on- TIA Portal with an S7-1200 or S7-1500 CPU and a TP700 Comfort panel, or PLCSIM with HMI simulation
- The DB_IO and mapping-FC structure from the HMI alarm configuration lesson
- Simulation only; do not test on live equipment
- Estimated time: 90 minutes
Map the station I/O
Add B1 – B5 and the outputs Y1, Y2 and K2 to the PLC tag table, copy the inputs into DB_IO and the outputs from DB_SeqOut in the mapping FCs.
Create DB_Seq
Add Step, WaitCode, StepTime_s, StepMax_s, CycleTimeLast_s, CycleCount, Mode_Auto, the four command bits and the Alarms word, all accessible from HMI.
Write FB_DrillSeq
Program the CASE sequence with wait codes, the step timer, per-step watchdogs, cycle time and counter, and call it in OB1 between the mapping FCs.
Create text lists and HMI tags
Add TL_Step and TL_Wait, drag DB_Seq into the HMI tag table and add the step timeout discrete alarm on DB_Seq_Alarms bit 0.
Build the Sequence screen
Draw objects 1 – 12 from the layout figure on the screen template, with the appearance animations and button events from the object table.
Test every wait and timeout
Run cycles in PLCSIM or the simulator, block B5 to force a step 30 timeout, recover with RESET, and step through a full cycle in STEP mode.
From the sequence screen alone, anyone can say which step the machine is in, what it is waiting for, whether it has waited too long, and how long the last cycle took.
Frequently asked questions
What is an HMI sequence status screen?
It is a screen that shows where a step sequence is: the active step number and name, what the step is waiting for, how long it has been waiting compared with its watchdog time, and cycle data such as last cycle time and part count.
Why number sequence steps in tens?
Steps 0, 10, 20 … leave room to insert a new step such as 35 later without renumbering the PLC code, the HMI text lists and the documentation.
How do I show which condition a step is waiting for?
In each step, write a wait code that names the first missing transition condition, and show it on the HMI with a symbolic I/O field linked to a text list, for example Waiting: slide at bottom (B5).
What is a step watchdog?
A maximum time for a machine-driven step. If the step time exceeds it, the PLC raises a step timeout alarm and blocks further transitions, so a jammed axis or failed sensor is reported instead of the machine silently waiting.
How do I measure step time in TIA Portal?
Call a TON with IN = (Step = StepOld) and a long PT, then copy StepOld := Step. Every step change makes IN false for one scan, which resets ET, so ET is the time spent in the current step.
What is step mode on an HMI?
A commissioning mode in which each transition needs a NEXT button press as well as its normal condition, so engineers can check every step slowly. It should be protected by a maintenance authorisation.