Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
“Besides black art, there is only automation and mechanization.”
Federico Garcia Lorca
The Gantry Automation Project Overview
The Objectives
Our Approach
How it was programed
The Logic Codes
The Final Result
Rhys Porter , Joseph Eric Roy, Anthony Moody
The Objectives
To Solve a Puzzle Using Automation
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
The Objectives
To Solve a Puzzle Using Automation
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
The Objectives
To Solve a Puzzle Using Automation
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
The Objectives
The Puzzle Solved State
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
Our Approach
Understand the task, then
Define the sequences
How it’s going to be done
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
Stack all the disks together
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
Measure the disks
Till the puzzle is solved
H0 H1 H2 H3 H4
V0
V1
V4
V2V3
Green
Amber
Red
“Controlling complexity is the essence of computer programming”
(Brian Kernigham)
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
Interaction of Main States
Interaction of Main States (Simplified)
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
“If you don’t trust them, then program them”
Machines
(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