2. What is a State Machine?
• “Any function whose next behavior depends on past history.”
• Gary Platt, Book of Codesys, pg. 106
• Case Statement or a finite state machine used to sequence a number
of steps.
• Tom Meyer Antonsen, PLC Controls With Structured Text, pg. 66
• Sequencer
• PackML
• PackML (omac.org)
• Verilog: A sequential circuit that advances through a number of
states
3. Point I am trying to Make
• State Machines are a buzz word right now, but they have been
around.
• It does not matter what language you are using.
• The key thing is that you map out your states and the transitions
clearly.
8. Note: Nestle adapted Pack ML Suggestions and
ISA standard to their environment and for their
needs.
• ANSI/ISA-TR88.00.02-2015 is a suggested guideline on how to
do the following:
• Create like “look and feel” for the operators.
• Have the same machine status across all machines.
• Create an alarm structure that is repeatable.
9. ISA Puts it Like SO
1.A definition of machine/unit state types
2.A definition of machine/unit control modes
3.A definition of unit control mode management
4.State models, state descriptions, and mode and state transitions
5.A definition of the minimum PackTags required for performance
monitoring
11. Now Study that State Machine a Bit Before
Acting.
• Why? We have made machines since the beginning of time and do
we really need to be quite so complicated about it
• Ie, Take your basic steps
• Not Running
• Running
12. Not Running
• Stopped
• Define what stopped means. Does this mean clearing the section of the
machine of parts and activity, or does it mean finishing the current state and
going idle?
• Faulted
• Define characterized faults.
• Offline
• Non emergency shut down, bypass, maintenance mode, etc.
• Emergency
• Emergency
14. Then Look at Transitions
• How do I go from Not Running to Running
• What Interlocks do I need?
• What are my permissives?
• Manual Mode
• What happens in Manual Mode as opposed to Automatic?
• If in Automatic, do you have to STOP, ABORT, HOME, then START?
• What are your options that consider safety, data transitions, and machine
steps?
15. Transitions
• Initialization
• Hold/pause
• Shutting Down or Stopping
• Aborting
• Resetting
• Use common sense that makes sense for the machine, architecture,
operator, process, and that does not jeopardize safety.
18. Conveyor Example
INIT
START PAUSE STOP AND RETURN STOP
NORMAL RUN
STOP MOTOR
FOR MOOSE
CROSSING
STOP SEQUENCE + STOP
MOTOR + RESUME
MAINTENANCE, JAM,
EMERGENCY
READ IO AND DETERMINE
MACHINE CONDITION BEFORE
MAKING A CALL
19. PANAMA CANAL LOCKS
• 1. The vessel approaches towards the lower chamber of the canal
locks;
• 2. the valve of the first chamber opens and water flows by force of
gravity from the higher chamber to the lowest one, bringing the water
level to the sea level;
• 3. the locked gate opens to allow the ship into the chamber, and the
gate closes behind it;
• 4. the valve of the next chamber is opened to increase the water level
to that of the first chamber;
• 5. the gate of the lock is opened and the ship enters the next
chamber;
• 6. The water level is equalized again and the ship finally exits the
lock and enters the 77 km long canal.
How the Water Locks of Panama Canal Work? (marineinsight.com)
20. Canal Locks
Request
Level Feedback
Gate Control
Valve Control
Flow Control
Vessel or not vessel.
Gate opened or closed.
In progress, put vessel in
queue.
START
Release
STOP