“besides black art, there is only automation and mechanization.” federico garcia lorca
TRANSCRIPT
The Gantry Automation Project Overview
The Objective
s
Our Approach
How it was
programed
The Logic Codes
The Final Result
Rhys Porter , Joseph Eric Roy, Anthony Moody
S1 : Dormant
LightsS100-199
S2 : Starting
LightsS200-299
S3 : Recover
ActionsS300-349
LightsS350-399
S4 : E-
Stopped
LightsS400-499
S5 : Running
StackingS1000-1499
SortingS1500-1999
LightsS350-399
Hierarchical State Machine Design
Resource AllocationName 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
Benefits of a Hierarchical State Machine• Minimises code duplication
• Eg “Go Home” memory bit to return to HO,VO
• Easy to follow debugging• Ability to see states the PLC is in at any point
• Any sub-state bugs are contained• 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
Physical Constraints • Speed• Simulation• Suction
• Time• Over extension
• Switch location• S7-300 PLC• TIA portal software