ABB PLC Lab Manual · Lab 17 of 20 · Ladder Programming for Machines

Auto Mode Sequence Logic in ABB PLC Ladder Programming

Make the conveyor run itself. Design a step chain from Idle to Count, write each transition in ladder, add a jam watchdog, and handle stop and fault so the sequence always ends in a known state.

2,500+ engineers trained 4.9/5 Google rating 21+ years, Chinchwad, Pune Real AC500-eco + ACS580 trainer kits
Lab 17 of 20 · 75 minutes · Level: Intermediate
Quick answer

Auto mode logic is best written as a step sequence (state machine): one integer Step holds the current state, each step has clear actions, and each transition has one condition. For the conveyor: 10 Ready → Start → 20 Wait part → entry sensor → 30 Conveying (motor on, jam timer) → exit sensor → 40 At exit (motor off) → part removed → 50 Count → 20. Stop, mode change or any alarm sends the sequence to 0.

  • One step active at a time: an integer Step is easiest to read and debug
  • Actions depend only on the step; transitions only on conditions
  • Every moving step has a watchdog timer that raises an alarm
  • Stop, mode change and alarms always lead to a defined step
HardwareKit with entry/exit sensors
SoftwareLabs 11–16 logic
Time75 minutes

Sequence logic written as a tangle of seal-in rungs works until someone needs to change it. A step chain makes the machine's behaviour readable: look at the step number, and you know exactly what the machine is waiting for.

Step 1: Design the Step Table

Sequence design 15 minutes
10 Idlenot in auto or fault
210 Readyauto, wait Start
320 Wait partwait entry sensor
430 Conveyingmotor ON, jam timer
540 At exitmotor OFF, wait removal
650 CountC_Parts +1 → step 20
StepNameAction (outputs)TransitionNext
0IdleAll offAuto mode AND no alarm10
10ReadyAmber lamp, start lamp flashStart pressed20
20Wait partMotor offDI_Entry_Sensor30
30ConveyingCmd_Motor_Run, T_Jam runningDI_Exit_Sensor40
40At exitMotor offNOT DI_Exit_Sensor (part removed)50
50CountC_Parts +1Always (one scan)20 (or 10 if batch done)
anyAbortAll offStop, manual, any alarm, T_Jam.Q0

Step 2: Run the Sequence in the Simulator

Interactive 15 minutes

Auto sequence simulator

Switch Auto on and press Start. Toggle the entry sensor ON (part arrives), then the exit sensor ON, then OFF (part removed). Leave the exit sensor off while conveying to see the 8 s jam alarm.

Inputs (click / hold)
Outputs
%QX0.0 Motor run
%QX1.2 Auto lamp
%QX1.0 Start lamp
Alm_Jam
Step: 0C_Parts.CV: 0T_Jam.ET: 0
001 Step 20 → 30: part at entryStep_20DI_Entry_Sensor%IX1.2Tr_20_30002 Step 30 → 40: part at exitStep_30DI_Exit_Sensor%IX1.3Tr_30_40003 Action: motor runs only in step 30Step_30DO_Motor_Run%QX0.0004 Jam watchdog in step 30Step_30TONINQPT T#8sT_JamSAlm_Jam

Green contact = passing power. Orange moving wire = rung is true and the output is energised.

Step 3: Write It in Ladder (and ST for Comparison)

Sequence POU 25 minutes

In ladder, compare the Step integer with EQ blocks to create step bits (Step_30 := Step = 30), write one transition network per step that MOVEs the next step number, and one action network per output. The same logic in ST is compact enough to read in one screen:

ST
IF NOT Sts_Auto_Mode OR Any_Alarm OR NOT DI_Stop_PB THEN
    Step := 0;
END_IF;

CASE Step OF
  0:  IF Sts_Auto_Mode AND NOT Any_Alarm THEN Step := 10; END_IF;
  10: IF DI_Start_PB THEN Step := 20; END_IF;
  20: IF DI_Entry_Sensor THEN Step := 30; END_IF;
  30: IF DI_Exit_Sensor THEN Step := 40; END_IF;
  40: IF NOT DI_Exit_Sensor THEN Step := 50; END_IF;
  50: C_Parts_CV := C_Parts_CV + 1;
      IF C_Parts_CV >= Par_Batch_Size THEN Step := 10; ELSE Step := 20; END_IF;
END_CASE;

T_Jam(IN := Step = 30, PT := T#8s);
IF T_Jam.Q THEN Alm_Jam := TRUE; END_IF;
Cmd_Auto_Run := Step = 30;

Step 4: Test the Auto Sequence

Kit 20 minutes
0 of 5 checks recorded
IDCheckHow to checkPass criterionResult
Auto sequence tests
AS-01Normal cycleRun 3 partsSteps 10-20-30-40-50-20, count = 3
AS-02Stop mid-cyclePress Stop in step 30Motor off, step 0
AS-03JamBlock exit sensorAlm_Jam after 8 s, step 0
AS-04Mode changeSwitch to manual in step 30Step 0, motor off
AS-05RestartReset, auto, StartSequence restarts from step 20

Practice Exercise

Exercise

Add step 35 “Slow down”: when a second sensor before the exit sees the part, reduce speed (ACS580 constant speed 2 in Lab 20). Update the step table first, then the code.

Troubleshooting

SymptomLikely causeFix
Sequence skips stepsSeveral transitions in one scanUse an integer step and ELSIF/one transition per step
Sequence stuckTransition condition never TRUEMonitor Step and the condition online
Count jumps by manyStep 50 held more than one scanLeave step 50 in the same scan
Motor runs in step 40Output also written elsewhereActions only in Motor_Logic via Cmd_ bits

Frequently asked questions

How do I program a sequence in PLC ladder logic?

Use an integer step variable. Create a network per transition that moves the next step number when its condition is TRUE, and drive outputs from step comparisons.

Why use an integer step instead of seal-in bits?

Only one step can be active, the current state is visible as one number and adding steps does not change existing rungs.

What is a watchdog timer in a sequence?

A timer that runs while a step waits for something. If the time is exceeded, it raises an alarm such as a jam instead of waiting forever.

Should I use SFC for sequences in Automation Builder?

SFC is supported and suits large sequences. Integer steps in LD or ST are easier for beginners and maintenance teams to follow.

Reviewed by Bhawesh Kumar SinghIndustrial Automation Trainer and Industry 4.0 Consultant · Softwell Automation · 21+ years industry experience

Get the full ABB PLC syllabus + free demo class

Share your details. A Softwell training advisor will call you within 24 hours with batch dates, fees and AC500 hardware access options.

No spam. Used only to share course details for this enquiry.

Practise every lab on real ABB hardware

AC500-eco PLC, ACS580 drive and HMI trainer kits: live online, Pune classroom or corporate in-plant training.

Request Course Details
Verified learning pathway

Discuss This Technical Course

Explore practical curriculum, software, hardware and batch options for this technology.

Content reviewed: 14 October 2026

ABB PLC & Automation Builder Learning Path

Follow the full 20-lab ABB AC500-eco practical series in order, or start from the ABB PLC Lab Manual hub.

  1. Lab 1: Automation Builder Installation & AC500-eco Setup
  2. Lab 2: Connect AC500-eco PLC via Ethernet
  3. Lab 3: Create a New Automation Builder Project
  4. Lab 4: AC500-eco IO Configuration
  5. Lab 5: Digital Input Mapping
  6. Lab 6: Digital Output Mapping
  7. Lab 7: First Ladder Program: Start/Stop
  8. Lab 8: Download a Program to AC500-eco
  9. Lab 9: Upload a Program from AC500-eco
  10. Lab 10: Online Monitoring, Force & Write
  11. Lab 11: Timers & Counters in Ladder
  12. Lab 12: Network & Tag Mapping
  13. Lab 13: Alarm Mapping & Fault Latching
  14. Lab 14: Tower Lamp Logic
  15. Lab 15: Emergency Stop & Interlocks
  16. Lab 16: Manual Mode Logic
  17. Lab 17: Auto Mode Sequence Logic
  18. Lab 18: Structured Text (ST) Programming
  19. Lab 19: AC500-eco to ACS580 Modbus RTU Setup
  20. Lab 20: Control ACS580 via Modbus RTU
  21. ABB AC500 PLC Selection Guide
☎ Call WhatsApp ✉ Email Enquire Now