“Besides black art, there is only automation and mechanization.” Federico Garcia Lorca The Gantry Automation Project Overview The Objectives How it was programed Our Approach The Final Result The Logic Codes Rhys Porter , Joseph Eric Roy, Anthony Moody The Objectives To Solve a Puzzle Using Automation V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red The Objectives To Solve a Puzzle Using Automation V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red The Objectives To Solve a Puzzle Using Automation V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red The Objectives The Puzzle Solved State V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red Our Approach Understand the task, then Define the sequences How it’s going to be done V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red Stack all the disks together V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red Measure the disks V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red Till the puzzle is solved V0 Green V1 V2 V3 V4 H0 H1 H2 H3 H4 Amber Red “Controlling complexity is the essence of computer programming” (Brian Kernigham) Hierarchical State Machine Design S1 : Dormant Lights S100-199 S2 : Starting Lights S200-299 S3 : Recover Actions S300-349 Lights S350-399 S4 : E-Stopped S5 : Running Lights S400-499 Stacking S10001499 Sorting S15001999 Lights S350-399 Resource Allocation Name Main State Sub-States State Memory Other Memory Timers Primary – S0-9 M0.0-3.7 M4.0-9.7 T0-9 Powerup S0 – – – – Dormant S1 S100-199 M10.0-13.7 M14.0-19.7 T10-19 Starting S2 S200-299 M20.0-23.7 M24.0-29.7 T20-29 Recover S3 S300-349 M30.0-33.7 M34.0-34.7 T30-34 Recover+Run Lights S3 S350-399 M35.0-38.7 M39.0-39.7 T35-39 E-Stop S4 S400-499 M40.0-43.7 M44.0-49.7 T40-49 Running: Stacking S5 S1000-1499 M100.0-103.7 M104.0-149.7 T100-149 Running: Sorting S5 S1500-S1999 M150.0-M153.7 M140.0-199.7 T150-199 Recover+Run Lights S5 S350-399 M35.0-38.7 M39.0-39.7 T35-39 Interaction of Main States Interaction of Main States (Simplified) Benefits of a Hierarchical State Machine • Minimises code duplication • • Easy to follow debugging • • Ability to see states the PLC is in at any point Any sub-state bugs are contained • • Eg “Go Home” memory bit to return to HO,VO Use of function calls and sub-state re-initialisation and clean up Mutated sub-state behaviour based on “Flag” memory bits set • Eg Different Lighting behaviours or stacking columns Machines “If you don’t trust them, then program them” (Joseph Eric Roy) Gantry Simulation Physical Constraints Speed • Simulation • Suction • Time • Over extension • Switch location • S7-300 PLC • TIA portal software • Stacking State Recovery State
© Copyright 2026 Paperzz