Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety
Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication
your local Rockwell Automation sales office or online at
http://www.rockwellautomation.com/literature/) describes some
important differences between solid-state equipment and hard-wired electromechanical devices. Because of this difference,
and also because of the wide variety of uses for solid-state equipment, all persons responsible for applying this equipment
must satisfy themselves that each intended application of this equipment is acceptable.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from
the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and
requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or
liability for actual use based on the examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or
software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation,
Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous
environment, which may lead to personal injury or death, property damage, or economic loss.
SGI-1.1 available from
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death,
property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the
consequence
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that
dangerous voltage may be present.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that
surfaces may reach dangerous temperatures.
IMPORTANT
Allen-Bradley, Rockwell Software, Rockwell Automation, SoftLogix, FlexLogix, CompactLog ix, ControlLogix, DriveLogix, PhaseManager, Powerflex 700S, Logix5000, Logix5550, PLC -5, SLC 500, SoftLogix5800,
FactoryTalk Batch, RSLogix 5000, RSBizWare Batch, and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Identifies information that is critical for successful application and understanding of the product.
Page 3
Summary of Changes
Introduction
Updated Information
The release of this document contains new and updated information. To find
new and updated information, look for change bars, as shown next to this
paragraph.
Converting PLC-5 or SLC 500 Logix to Logix5550 Logic Refernce
Manual, publication
1756-RM003
1756-RM006
MOTION-RM002
1756-RM084
1756-RM085
LOGIX-UM001
1769-UM007
ControlLogix System User Manual, publicaton
DriveLogix System 5720 User Manual, publication
DriveLogix5730 Controller for PowerFlex 700S Drives with
PhaseII Control User Manual, publication
FlexLogix Controllers User Manual, publication
SoftLogix5800 System User Manual, publication
control devices over an EtherNet/IP networkEtherNet/IP Modules in Logix5000 Control Systems User
Manual, publication
control devices over an ControlNet networkControlNet Modules in Logix5000 Control Systems User Manual,
publication
control devices over an DeviceNet networkDeviceNet Modules in Logix5000 Control Systems User Manual,
publication
CNET-UM001
DNET-UM004
ENET-UM001
1756-UM001
20D-UM002
20D-UM003
1794-UM001
1789-UM002
7Publication LOGIX-UM001B-EN-P - April 20107
Page 8
PrefacePreface
Purpose of This Manual
Who Should Use This
Manual
This manual shows you how to set up and program a Logix5000 controller to
use equipment phases. It gives you guidance and examples to:
• lay-out your code in sections that include equipment phases.
• set up a state model for your equipment.
• program your equipment to run by the state model.
• use equipment phase instructions to transition to a different state,
handle faults, set up break points, and so forth.
A Logix5000 controller is any of the following:
• 1756 ControlLogix controllers
• 1769 CompactLogix controllers
• 1789 SoftLogix5800 controllers
• 1794 FlexLogix controllers
• 20D PowerFlex 700S with DriveLogix controllers
This manual is for those who program or maintain industrial automation
systems.
How To Use This Manual
To use this manual, you must already have experience with:
• programmable controllers.
• industrial automation systems.
• personal computers.
As you use this manual, text that is courier identifies information that you
must supply based on your application (a variable). For example, ‘Right-click
name_of_program ...’ means that you must identify the specific program in
your application. Typically, it is a name or variable that you have defined.
8Publication LOGIX-UM001B-EN-P - April 2010
Page 9
Introduction
Chapter 1
PhaseManager Overview
Controller
Controller Tags
Tasks
MainTask
Add_Water_Phase
Mix_Phase
Drain_Phase
Space_Parts_Phase
PhaseManager software lets you add equipment phases to your controller. An
equipment phase makes it easier to write, use, and manage the code for your
machine or equipment.
A PHASE tag gives you the status of an equipment phase.
An equipment phase directs 1 activity of your equipment.
A state model divides the activity into a set of states that have specific transitions.
Running State Routine
How to add
water
MainProgram
My_Equipment_Program
9Publication LOGIX-UM001B-EN-P - April 20109
Equipment phase instructions control the transitions between
states, handle faults, and so forth.
PSCPOVRPCLFPRNPPATT
PCMDPFLPXRQPPDPDET
Other code does the specific actions of your equipment
Water Feed
ConveyorEnable Axes
Page 10
Chapter 1Introduction
PhaseManager Terms
TermDescription
equipment phaseAn equipment phase is similar to a program:
state modelA state model divides the operating cycle of your equipment into a set of states. Each state
state machineThe controller has an embedded state machine for the equipment phase. This makes it a lot
• you run the equipment phase in a task.
• you give the equipment phase a set of routines and tags.
An equipment phase is different from a program in these ways:
• The equipment phase uses a state model.
• Use an equipment phase to do 1 activity of your equipment.
is an instant in the operation of the equipment. It's the actions or conditions of the
equipment at a given time.
The state model of an equipment phase is similar to these state models:
• U.S. standard ISA S88.01-1995 and its IEC equivalent IEC 61512-1-1998, commonly
referred to as S88
• PackML, which was previously under the supervision of OMAC but is now a working
group within ISA
easier to use the state model. The state machine:
• calls the main routine (state routine) for an acting state.
• manages the transitions between states with minimal coding.
You code the transition conditions. When the conditions are true, the state machine
transitions the equipment to the next required state.
• makes sure that the equipment goes from state to state along an allowable path.
For example, if the equipment is in the Complete or Stopped state, the equipment phase
makes sure that it goes only to the Resetting state. This simplifies the amount of
interlocking that you have to do.
equipment phase instructionsSpecific instructions that you use to control an equipment phase. See
PHASE tagWhen you add an equipment phase, RSLogix 5000 programming software makes a tag for
the equipment phase. The tag uses the PHASE data type. Use the tag to:
• see which state the equipment phase is in.
• hold a failure code for the equipment phase.
• hold an index for your steps.
• hold the unit ID.
• see the status of an external request to FactoryTalk Batch software.
• see if FactoryTalk Batch software has new parameters for the equipment phase.
• set up producing and standby states.
See
Appendix B
for more information about the PHASE data type.
Appendix A
.
PhaseManager software helps you write the code for your equipment in a
structured way. This results in the same behavior for all the equipment across a
plant.
10Publication LOGIX-UM001B-EN-P - April 2010
Page 11
IntroductionChapter 1
PhaseManager Questions and Answers
QuestionAnswer
How can I get the highest performance possible
from my equipment?
You have to measure equipment performance to improve it. The state model gives you a
way to measure the status of your equipment. With that data, you'll be able to calculate
the efficiency and performance measures that you want.
If you use PhaseManager software across your plant, you have consistent data from
equipment to equipment.
How can I cut the cost of integrating my
equipment into the plant?
Clear structure and consistent tags make it a lot easier to plug the equipment into your
plant and set up communication right away. Equipment up and down that line share
data using the same tag names. And all equipment communicates with higher-level
systems in the same way.
How can I make it easier to maintain the code? A state model helps you lay out the general functions of your equipment. We found that
the best programmers use a state model as the heart of their code. A state model serves
as a map for the code. With a clear structure, you'll know just where to look for the
piece of code that you want.
How can I give my operators a clean, intuitive
HMI?
A state model lets you make all your equipment behave the same. Your HMIs can then
show consistent equipment conditions across the plant. When an HMI says that the
equipment is idle, running, or holding, your operators will know exactly what that
means.
Publication LOGIX-UM001B-EN-P - April 201011
Page 12
Chapter 1Introduction
State Model Overview
Start
Idle
Running
A state model divides the operating cycle of your equipment into a series of
states. Each state is an instant in the operation of the equipment. It's the
actions or conditions of the equipment at a given time.
In a state model, you define what your equipment does under different
conditions, such as run, hold, stop, and so forth. You don’t need to use all the
states for your equipment. Use only the states that you want.
There are two types of states.
Type of StateDescription
ActingDoes something or several things for a certain time or until
certain conditions are met. An acting state runs one time or
repeatedly.
WaitingShows that certain conditions are met and the equipment is
waiting for the signal to go to the next state.
PhaseManager software uses the following states.
Hold
Holding
Held
Your equipment can go from any
state in the box to the stopping or
aborting state.
Resetting
Reset
Complete
Reset
Hold
Restart
Restarting
Stop
Abort
Stopping
StoppedAborted
Aborting
Abort
Acting
Acting states represent the
things your equipment does at
a given time.
Waiting
Waiting states represent the
condition of your equipment
when it is in-between acting
states.
12Publication LOGIX-UM001B-EN-P - April 2010
Page 13
IntroductionChapter 1
One common objection to a state model is that it doesn't fit all equipment.
You may hear or think: ‘My equipment is very complex. There's a lot of
synchronization and many things happen in parallel.’
Keep in mind that a state model looks at your equipment at a very general
level. Different equipment does different things and needs specific code for
everything it does. A state model simply gives you a higher-level framework for
your code.
• The state model defines the general behavior, commands, and status of
the equipment.
• You program the details of the equipment within that framework.
Equipment States
The use of a state model may sound like a big change for programmers. But it's
simply a different way to look at the same control problem.
With a state model, you define the behavior of your equipment and put it into
a brief functional specification. In this way you show what happens and when
it happens.
For this StateAsk
StoppedWhat happens when you turn on power?
ResettingHow does the equipment get ready to run?
IdleHow do you tell that the equipment is ready to run?
RunningWhat does the equipment do to make product?
HoldingHow does the equipment temporarily stop making product without
making scrap?
HeldHow do you tell if the equipment is safely holding?
RestartingHow does the equipment resume production after holding?
CompleteHow do you tell when the equipment is done with what it had to do?
StoppingWhat happens during an normal shutdown?
AbortingHow does the equipment shutdown if a fault or failure happens?
AbortedHow do you tell if the equipment is safely shutdown?
Publication LOGIX-UM001B-EN-P - April 201013
Page 14
Chapter 1Introduction
State Transitions
= transition
CommandDone — No command. Use PSC instruction instead.
Start
Idle
Resetting
Running
The arrows in the state model show to which states your equipment can go
from the state it is in now.
• Each arrow is called a transition.
• A state model lets the equipment make only certain transitions. This
gives the equipment the same behavior as any other equipment that uses
the same model.
PhaseManager software uses the following transitions.
Hold
Holding
Hold
Restarting
Held
Restart
Your equipment can go from any
state in the box to the stopping or
aborting state.
Stop
Reset
Complete
Reset
Type of TransitionDescription
CommandA command tells the equipment to start doing something or do something different. For example the
operator pushes the start button to start production and the stop button to shutdown.
PhaseManager software uses these commands:
resetstoprestart
startholdabort
DoneEquipment goes to a waiting state when it's done with what it's doing. You don’t give the equipment a
command. Instead, you set up your code to signal when the equipment is done. The waiting state
shows that the equipment is done.
FaultA fault tells you that something out of the ordinary has happened. You set up your code to look for
faults and take action if it finds any. Suppose you want your equipment to shut down as fast as
possible if a certain fault happens. In that case, set up your code look for that fault and give the abort
command if it finds it.
Stopping
StoppedAborted
Abort
Abort
Aborting
Fault (specific use of the abort
command)
14Publication LOGIX-UM001B-EN-P - April 2010
Page 15
IntroductionChapter 1
Manually Change State
State that the equipment phase is in right now
RSLogix 5000 programming software has a window that lets you monitor and
command an equipment phase.
To manually change states.
1. Take ownership of the equipment phase.
2. Give a command.
Ownership
Ownership locks out programs or FactoryTalk Batch software from giving
commands to an equipment phase.
If this owns the equipment phaseThen
RSLogix 5000 programming softwareSequencers can’t give commands to the
The following table compares PhaseManager software’s state model to other
common state models.
page 97
.
page 68
.
16Publication LOGIX-UM001B-EN-P - April 2010
Page 17
PhaseManager Quick Start
Chapter 2
Purpose of This Chapter
Use this quick start to:
• get an introduction to how an equipment phase runs.
• monitor an equipment phase.
• manually tell an equipment phase to go to a different state.
Use this quick start when you want to:
• try out PhaseManager software for the first time.
• test an equipment phase by manually stepping through its states.
TopicPage
Create an Equipment Phase18
Create a State Routine18
Manually Step Through the States19
Configure the Initial State for an Equipment Phase22
Equipment
17Publication LOGIX-UM001B-EN-P - April 201017
To use this quick start, you need:
• a Logix5000 controller. See the preface if you aren’t sure which
controllers are Logix5000 controllers.
• firmware, revision 18.0 or later, for the controller
• a power supply for the controller
• a communication path to the controller:
– Communication card or built-in port
– Corresponding communication cable
• RSLogix 5000 programming software, version 18.0 or later
Page 18
Chapter 2PhaseManager Quick Start
2
3
Create an Equipment Phase
1.
.
.
Create a State Routine
1.
2.
3.
18Publication LOGIX-UM001B-EN-P - April 2010
4.
Page 19
PhaseManager Quick StartChapter 2
Manually Step Through the
States
StepNotes
1. Right-click the equipment phase and choose Monitor Equipment
Phase.
Before you do this procedure, do the following:
• Download the project to the controller.
• Put the controller in run or remote run mode.
2. Click the ownership button and then Yes—take ownership.This lets you use this window to step through the states.
Publication LOGIX-UM001B-EN-P - April 201019
Page 20
Chapter 2PhaseManager Quick Start
StepNotes
3. Click Start.• The equipment phase goes to the Running state.
• Any code in the Running state routine starts running. This is
where you put the code for the normal production sequence of
your equipment.
4. Click Stop.• The equipment phase goes to the Stopped state.
• The Running state routine stops running.
• The Stopping state routine is optional. Without it, the
equipment phase goes directly to the Stopped state.
20Publication LOGIX-UM001B-EN-P - April 2010
Page 21
StepNotes
PhaseManager Quick StartChapter 2
5. Click Reset.• The equipment phase goes to the Idle state.
• The Resetting state routine is optional. Without it, the
equipment phase goes directly to the Idle state.
6. Click the ownership button.This releases the equipment phase from control by this window.
Publication LOGIX-UM001B-EN-P - April 201021
Page 22
Chapter 2PhaseManager Quick Start
3
4
2
Configure the Initial State
for an Equipment Phase
1.
.
The initial state is the first state to which the equipment phase goes after
power up.
. Choose your initial state.
.
22Publication LOGIX-UM001B-EN-P - April 2010
Page 23
Guidelines
Chapter 3
Purpose of this chapter
To guide your development and programming of a Logix5000 project that
uses equipment phases
Use this chapter:
• before you lay-out the equipment phases for your Logix5000 project.
• as a reference while you program the project.
Review the following guidelines before you lay-out your project and refer back
to them as needed:
TopicPage
Equipment Model Guidelines24
State Model Guidelines26
Equipment Code Guidelines31
Execution Guidelines34
State Completion Guidelines46
Transition Guidelines40
Equipment Interface Tag Guidelines48
Alias Tag Guidelines53
23Publication LOGIX-UM001B-EN-P - April 201023
Page 24
Chapter 3Guidelines
Equipment Model
Each equipment phase is a specific activity that your equipment does. An
equipment phase tells the equipment what to do and when to do it.
Guidelines
Follow these guidelines to decide how many equipment phases to use.
GuidelineDetails
Make sure each equipment phase does
an independent activity.
Keep the number of equipment phases
and programs within the following limits.
List the equipment that goes along with
each equipment phase.
Make sure each equipment phase does an activity that is independent (relatively
independent) from other equipment. The equipment phase commands all the equipment that
works together to do the specific activity.
Example
This is probably an equipment
phase
• Fill bottles with product.
• Put bottles in carton.
• Add water to a tank.
• Mix ingredients in tank
If you have this controllerYou can have up to
ControlLogix100 programs and equipment phases per task
SoftLogix100 programs and equipment phases per task
FlexLogix32 programs and equipment phases per task
CompactLogix32 programs and equipment phases per task
Example
This equipment phaseRelates this equipment
Add_Waterwater pump
Smart_BeltCoarse belt axis
This in probably NOT an equipment phase
• Accelerate filler axis (too small)
• Run bottling line (too big)
• Open water valve (too small)
• Brew ingredients (too big)
water valve
limit switch
Fine belt axis
Exit belt axis
24Publication LOGIX-UM001B-EN-P - April 2010
Page 25
tank completes these steps.
1. Adds water.
2. Heats the water.
3. Adds other ingredients.
4. Mixes all the ingredients.
5. Dispenses the finished
product.
GuidelinesChapter 3
Example 1: Tank
The following example shows the equipment phases for a tank that cooks
ingredients.
Which become these phasesWhich commands this equipmentTo cook the ingredients, the
Example 2: Smart Belt
The following example shows a smart belt. The smart belt does only one
activity. It spaces product evenly on an exit belt. Because it does only one
activity, it needs only 1 equipment phase.
Publication LOGIX-UM001B-EN-P - April 201025
Page 26
Chapter 3Guidelines
State Model Guidelines
A state model divides the operating cycle of your equipment into a series of
states. Each state is an instant in the operation of the equipment. It's the
actions or conditions of the equipment at a given time.
Follow these guidelines as you fill out the state model for an equipment phase.
GuidelineDetails
Fill out 1 state model for each phase.Each phase runs its own set of states. Fill out 1 state model worksheet for each phase.
Decide which state you want as your
initial state after power-up.
Which state do you want the equipment phase to go to when you turn on power?
ON
?
Idle
Resetting
Start
Running
Reset
Complete
Hold
Holding
Hold
Restarting
Stop
Stopping
Restart
Abort
Aborting
Held
Abort
Reset
An equipment phase goes to its initial state when you turn on power. We recommend that you
use one of these states as the initial state:
• Idle (default)
• Complete
• Stopped
Choose the initial state that best shows what your equipment is waiting to do after power-up
(reset, run, and so forth).
StoppedAborted
26Publication LOGIX-UM001B-EN-P - April 2010
Page 27
GuidelinesChapter 3
GuidelineDetails
Start with the initial state and work
through the model.
Start with the initial state. Then work forward from that point. Use the following questions to
help you.
For this StateAsk
StoppedWhat happens when you turn on power?
ResettingHow does the equipment get ready to run?
IdleHow do you tell that the equipment is ready to run?
RunningWhat does the equipment do to make product?
HoldingHow does the equipment pause without making scrap?
HeldHow do you tell if the equipment is safely paused?
RestartingHow does the equipment resume production after a pause?
CompleteHow do you tell when the equipment is done with what it had to do?
StoppingWhat happens during an normal shutdown?
AbortingHow does the equipment shutdown if a fault or failure happens?
AbortedHow do you tell if the equipment is safely shutdown?
Use only the states that you want.Define only the states that are appropriate for your equipment. You don’t need to use all the
states. The equipment phase just skips any states that you don’t add.
For the producing and standby states, use
subroutines.
If you want to define producing and standby states for your equipment, use subroutines.
A. Create a routines for the producing state and another routine for the standby state.
B. In the running state, check for the produce verses standby conditions. Set either the
Producing bit or the Standby bit of the equipment phase tag.
C. Use the Producing and Standby bits as conditions to call the corresponding routine.
See
Appendix B
.
Publication LOGIX-UM001B-EN-P - April 201027
Page 28
Chapter 3Guidelines
State Model Worksheet
IDLE
To
Done
RESETTING
Start
Command
RUNNING
Done
Equipment Phase:
Hold
Command
Done
HOLDING
RESTARTING
Done
HELD
Hold
Command
Restart
Command
Reset
Command
COMPLETE
Reset
Command
Command
STOPPING
Done
STOPPED
Stop
Abort
Command
Abort
Command
ABORTING
Done
ABORTED
Key
Waiting StateActing State
28Publication LOGIX-UM001B-EN-P - April 2010
Page 29
GuidelinesChapter 3
Example 1: Add Water
IDLE
· No water flow
· Tank Not full
· Operator can
control equipment
To
Done
RESETTING
Command
Start
RUNNING
· Lock equipment in
program control
· Add water
· Unlock equipment
from program
control
Done
Equipment Phase: Add Water
Hold
Command
Done
HOLDING
· Stop water
· Unlock equipment
from program
control
Hold
Command
RESTARTING
· Lock equipment in
program control
Done
HELD
· No water flow
· Operator can
control equipment
Restart
Command
Reset
Command
COMPLETE
· No water flow
· Water at high limit
· Operator can
control equipment
Reset
Command
Stop
Command
STOPPING
· Stop water
· Unlock equipment
from program
control
Done
STOPPED
· No water flow
· Operator can
control equipment
Abort
Command
Abort
Command
ABORTING
· Stop water
· Unlock equipment
from program
control
Done
ABORTED
· No water flow
· Operator can
control equipment
Key
Waiting StateActing State
Publication LOGIX-UM001B-EN-P - April 201029
Page 30
Chapter 3Guidelines
Example 2: Space Parts
IDLE
· No axes faults
· All axes = on
· Exit belt = homed
· Registration =
armed
· Clear axes faults
· Turn on all axes
· Home exit belt
· Arm registration
To
Done
RESETTING
Start
Command
RUNNING
· Jog exit belt
· Gear other belts
· Put 1 box on fine
belt
· Put 1 box on each
flight
Done
Equipment Phase: Space Parts
Hold
Command
Done
HOLDING
· Set speed of exit
belt = 0
Hold
Command
RESTARTING
· Jog exit belt
Done
HELD
· Speed of exit belt
=0
Restart
Command
Reset
Command
COMPLETE
Not used
Reset
Command
Stop
Command
STOPPING
· Run out boxes on
coarse belt
· Stop coarse and
fine belts
· Empty exit belt
· Stop exit belt
Done
STOPPED
· All axes = off
· SERCOS = phased
up
· All network
connections are
made
Abort
Command
Abort
Command
ABORTING
· Turn off all axes
Done
ABORTED
· All axes = off
· Boxes may still be
on belts
Key
Waiting StateActing State
30Publication LOGIX-UM001B-EN-P - April 2010
Page 31
GuidelinesChapter 3
Equipment Code Guidelines
Step 1
Step 2
Step 3
Step 4
To start the equipment, the equipment
phase gives the equipment program a start
command, a set point, and so forth.
The equipment program sends back
information such as current state, total, and
so forth.
One advantage of an equipment phase is that it lets you separate the
procedures (recipes) for how to make the product from the control of the
equipment that makes the product. This makes it much easier to execute
different procedures for different products using the same equipment.
Equipment Phase
Directs the actions of the
equipment (what to do and
when)
• produce product
• stop producing product
• add water to a tank
• wait for the operator to do
Equipment Program
Does the actions for a specific
group of devices (does it)
• jog axis
• run pump
• open valve
• calculate control variable
Step 5
Step 6
The equipment program controls the
equipment.
Publication LOGIX-UM001B-EN-P - April 201031
Page 32
Chapter 3Guidelines
Example 1: Add Water to a Tank
The equipment phase tells the equipment program to go to
program mode and add water.
The equipment program follows the commands of the equipment
phase and sends back its mode and state.
32Publication LOGIX-UM001B-EN-P - April 2010
Page 33
Example 2: Smart Belt
The equipment phase tells the equipment program to reset faults. The
equipment phase then waits for the equipment program to turn on a done
bit. When the done bit turns on, the equipment phase clears the command
to reset faults. The equipment phase then goes to the next step in the
sequence.
GuidelinesChapter 3
The equipment program resets faults when it gets the fault reset command
from the equipment phase. It turns on a done bit after it clears the faults.
Publication LOGIX-UM001B-EN-P - April 201033
Page 34
Chapter 3Guidelines
Execution Guidelines
Use the resetting, running, and stopping states
for the normal execution of the equipment.
A state model makes it much easier to separate the normal execution of your
equipment from any exceptions (faults, failures, off-normal conditions).
Use the holding, restarting, and aborting states to
handle exceptions (faults, failures, off-normal
conditions).
HoldingIdleRunningHeld
Resetting
Complete
Restarting
StoppingAborting
StoppedAborted
GuidelineDetails
Use the prestate routine to watch for
faults
Use the prestate routine for conditions that you want to watch all the time such as fault bits.
The prestate routine:
• runs all the time.
• runs before each scan of a state.
• runs even in the waiting states (idle, held, complete, stopped, or aborted).
prestate routine
current state
routine
34Publication LOGIX-UM001B-EN-P - April 2010
Page 35
GuidelineDetails
Create a prestate routine just like the
routine for a program. It’s not a phase
state routine.
1.
2.
GuidelinesChapter 3
3. Choose any language.
4.
Publication LOGIX-UM001B-EN-P - April 201035
Page 36
Chapter 3Guidelines
3
4
2
GuidelineDetails
Assign a prestate routine.
1.
.
.
.
Use a state bit to limit code to a specific
state
RSLogix 5000 software automatically makes a tag for each equipment phase. The tag has bits
that tell you the state of the equipment phase.
• The tag is at the controller scope.
• The tag uses the PHASE data type.
• Use bits of the tag for code that you want to limit to certain states.
Example
Suppose the name of your equipment phase is My_Phase. And you have some code that you
want to run only when the equipment phase is in the running state. In that case, check the
My_Phase.Running bit for on (1):
If My_Phase.Running then…
See
Appendix B
for more information.
36Publication LOGIX-UM001B-EN-P - April 2010
Page 37
GuidelinesChapter 3
GuidelineDetails
Use the empty phase state routine to
complete phase execution
Unlike normal program routines, phase state routines are called by the batch manager (not
other program routines(, so they always have the potential of being called.
In the configuration for a phase state routine, if the Complete State Immediately if not
Implemented option is checked in RSLogix 5000 programming software, version 18 or later, an
implemented, but empty (no logic), phase state routine behaves the same as an implemented
phase state routine. The state immediately completes and execution of the phase continues.
The phase then enters the next state in the state machine.
In RSLogix 5000 programming software, version 16 and earlier, if a phase enters a state for
which a state routine exists, but contains no logic, execution of the phase stops. The routine
does complete, but there is no logic to execute.
Choose from the following if you import a new state routine and in the Online Options dialog
box.
• Import Logic Edits as Pending, an empty routine is created in the controller and the
pending edits exist in the offline project.
• Accepts Program Edits, an empty routine is created in the controller and the logic is placed
in a test edits container in the routine. If you are not actively testing edits, then the routine
appears as empty when running.
• Finalize All Edits in Program, the routine is created with the new logic and does not appear
empty.
In the first two cases, if the Complete State Immediately if not Implemented option is
checked, the empty routine will complete immediately and allow phase execution to continue.
Use the PFL instruction to signal a faultThe Equipment Phase Failure (PFL) instruction sets a failure code for an equipment phase. Use
the code to signal a specific failure such as the fault of a specific device.
• The PFL instruction writes a code to the failure member for the equipment phase.
• To see the failure code of an equipment phase, look at the phase_name.Failure tag.
• The failure code stays until any of the following happens:
• A PFL instruction sets the failure code to a larger number.
• The equipment phase transitions from the resetting state idle state.
• A PCLF instruction clears the failure code.
• FactoryTalk Batch software clears the failure code.
See
page 72
for more information.
Use a PCLF instruction to clear a failure
code
The Equipment Phase Clear Failure (PCLF) instruction clears the failure code for an equipment
phase.
• A CLR instruction, MOV instruction, or assignment (:=) d doesn’t change the failure code of
an equipment phase.
• If you are testing a PCLF instruction, make sure RSLogix 5000 software doesn’t own the
equipment phase. The PCLF instruction doesn’t work if RSLogix 5000 software owns the
equipment phase.
See
page 76
for more information.
Publication LOGIX-UM001B-EN-P - April 201037
Page 38
Chapter 3Guidelines
Example 1: Add Water to a Tank
The prestate routine watches for equipment faults while the equipment phase is in
the running state (Add_Water.Running = 1). If Water_Feed.Health = 1, then a fault
happened. If a fault happens, the equipment phase sets a failure code of 202.
If Add_Water.Running And Water_Feed.Health Then
PFL(202);
End_If;
The equipment program watches the fault bits of the valve, pump, and their feedback devices.
If any of that equipment faults, the equipment program turns on the Water_Feed.Health bit.
38Publication LOGIX-UM001B-EN-P - April 2010
Page 39
Example 2: Smart Belt
GuidelinesChapter 3
The preset value of this step = 20000 ms. The step
turns on its DN bit if it doesn’t clear the faults
within 20000 ms.
If Step_000.DN = on, a timeout happened. When a timeout happens, the OSR instruction
turns on the Clear_Faults_Timeout bit for one scan.
If MyPhase is in the resetting state and Clear_Faults_Timeout is on, then the PFL instruction
signals a failure. The PFL instruction sets the failure code = 501.
Publication LOGIX-UM001B-EN-P - April 201039
Page 40
Chapter 3Guidelines
Transition Guidelines
To start an acting state, you usually have to give the equipment phase a
command. The command tells the equipment phase and its equipment to start
doing something or do something different. Use the Equipment Phase
Command (PCMD) instruction to give a command to an equipment phase.
Optional: You can also use FactoryTalk Batch software in place of a PCMD
instruction to trigger transitions
Use the state model to see which transitions need a PCMD instruction.
Idle
Resetting
PCMD instruction
Start
Reset
Running
donedonedone
Complete
Hold
Restarting
Stopping
Holding
PSC instruction
done
Hold
Restart
Stop
Abort
Held
Abort
Aborting
Reset
Type of TransitionDescriptionInstruction
CommandA command tells the equipment to start doing something or do something
different. For example the operator pushes the start button to start production
and the stop button to shutdown.
PhaseManager software Software Software uses these commands:
resetstoprestart
startholdabort
DoneEquipment goes to a waiting state when it's done with what it's doing. You
set up your code to signal when the equipment is done. The waiting state
shows that the equipment is done.
Exception: The restarting state goes to the running state when it’s done.
StoppedAborted
PCMD
Use an Equipment Phase
Command (PCMD) instruction
to give a command. Or use
RSLogix 5000 software.
See
page 62
information.
PSC
Use the Phase State Complete
(PSC) instruction to signal
when a state is done. See
page 59
for more information.
donedone
for more
40Publication LOGIX-UM001B-EN-P - April 2010
Page 41
GuidelineDetails
A PCMD instruction causes a transition
right away.
A PCMD instruction makes an equipment phase go to the commanded state. The equipment
phase changes states as soon as it finishes its current scan. This happens even if the current
state isn’t done.
See if you need to reset the state that
you’ve left.
Are you leaving an acting state (for example, running, holding)?
• YES — Consider resetting the code of the state that you’ve left.
• NO — You probably don’t need to reset anything.
The equipment phase stops running the code of the current state when it goes to a different
state. This leaves outputs at their last values unless the new state takes control of them. It
also leaves an SFC at the step it was at when the equipment phase changed states.
Example 1: You don’t need to reset
Suppose your equipment phase is in the idle state. In that case, it isn’t running any state code.
So you probably don’t need to reset any state when you go to a different state like running,
stopping, and so forth.
Example 2: You don’t need to reset
Suppose your equipment phase is in the running state and you go to the holding state. When
you go back to the running state, you probably want to pick up where you left off. In that case,
you probably don’t need to reset the code in the running state.
GuidelinesChapter 3
Use an SFR instruction to reset the SFC of
a state routine.
Use the PCMD instruction to go to an
allowed next state.
Example 3: You must reset
Suppose your equipment phase is half way through the resetting state and you give the stop
command. And suppose you want to run the entire resetting sequence when you go back to it.
In that case, you probably need to reset the code of the resetting state. If the resetting state
uses an SFC, then use the SFR instruction to reset it to the first step.
An SFC Reset (SFR) instruction is one way to reset an SFC. In some cases, reset an SFC from
several other state routines.
To reset the SFC of this
Place an SFR instruction in this state routine
state
RunningResetting
HoldingHolding—Let the SFC reset itself at the last step.
RestartingReset the restarting routine in both these routines:
• Holding—In case you go back to holding before you finish
restarting.
• Restarting—Let the SFC reset itself at the last step.
PhaseManager software makes sure that an equipment phase follows the state model. So the
equipment phase goes only to certain states from the state that it is in right now.
Example 1: A transition is allowed
Suppose your equipment phase is in the running state and you give it the hold command. In
that case, the equipment phase goes to holding because that transition is allowed.
Example 2: A transition isn’t allowed
Suppose your equipment phase is in the running state and you give it the reset command. In
that case, the equipment phase stays in the running state. To go to the resetting state, you
first have to stop or abort the equipment phase.
Publication LOGIX-UM001B-EN-P - April 201041
Page 42
Chapter 3Guidelines
GuidelineDetails
See if you must use a POVR instruction
instead of a PCMD instruction.
Takes ownership
My Code
Can’t command
A. Are you giving the hold, stop, or abort command?
· NO — Use the PCMD instruction.
· YES — Go to step B.
B. Must the command work even if you have manual control of the equipment phase via
RSLogix 5000 software?
· YES — Use the POVR instruction instead. See
page 68
.
· NO — Go to step C.
C. Must the command work even if FactoryTalk Batch software or another program owns the
equipment phase?
· YES — Use the POVR instruction instead. See
page 68
.
· NO — Use the PCMD instruction.
42Publication LOGIX-UM001B-EN-P - April 2010
Page 43
GuidelinesChapter 3
Example 1: Tank
The controller uses an SFC to command the phases that run the tank (add water,
heat, add ingredients, and so forth).
Give the start command to the Add_Water equipment
phase. The P1 qualifier limits this to the first scan of
the step.
Wait until the Add_Water equipment phase
is done (complete). When the equipment
phase is done, give the reset command. The
P0 qualifier limits this to the last scan of the
step.
Start the next equipment phase.
Publication LOGIX-UM001B-EN-P - April 201043
Page 44
Chapter 3Guidelines
Example 2: Smart Belt
If the operator presses the start button on the machine or HMI, then
My_Inputs.AnyStartPressed = on for 1 scan.
The ONS instruction makes sure that My_Inputs.AnyStartPressed turns on only
when a start button goes from off on.
If the equipment phase is in the idle state and My_Inputs.AnyStartPressed = on, then
The PCMD instruction gives MyPhase the start command.
44Publication LOGIX-UM001B-EN-P - April 2010
Page 45
GuidelinesChapter 3
Example 3: Jam Detection
The equipment program watches for the following faults:
• Faulted axis
• Jammed material
If there is a fault, then
Local_Interface.Equipment_Faults_Cleared = 0. This tag is an alias for the
controller-scoped tag Shear_1.
The prestate routine of the equipment phase watches for the equipment program to signal a
fault.
• If Interface_To_Equipment.Equipment_Faults_Cleared = 0 then there is a fault.
• Both Interface_To_Equipment and Local_Interface are aliases for Shear_1, so they have
the same values.
If there is a fault Then
Give the Shear_One_Phase equipment phase the abort command. The POVR instruction
makes sure the command works even if someone has manual control of the equipment
phase through RSLogix 5000 software.
The PFL instruction sets the failure code for Shear_One_Phase = 333.
The Fault_Strobe keeps these actions to a single scan.
Publication LOGIX-UM001B-EN-P - April 201045
Page 46
Chapter 3Guidelines
State Completion
Guidelines
IMPORTANT
To leave an acting state, you usually signal that the state is done doing what it
had to do. Use the Phase State Complete (PSC) instruction to signal when a
state is done.
The PSC instruction doesn’t stop the current scan of a routine.
When the PSC instruction executes, the controller scans the rest of the routine and
then transitions the equipment phase to the next state. The PSC instruction does not
terminate the execution of the routine.
Use the state model to see which transitions need a PSC instruction.
Idle
Resetting
PCMD instruction
Start
Hold
Running
donedonedone
Restarting
Holding
PSC instruction
done
Held
Hold
Restart
Stop
Reset
Complete
Reset
Type of transitionDescriptionInstruction
CommandA command tells the equipment to start doing something or do something
different. For example the operator pushes the start button to start production
and the stop button to shutdown.
PhaseManager software Software uses these commands:
resetstoprestart
startholdabort
DoneEquipment goes to a waiting state when it's done with what it's doing. You
set up your code to signal when the equipment is done. The waiting state
shows that the equipment is done.
Exception: The restarting state goes to the running state when it’s done.
Stopping
StoppedAborted
Abort
PCMD
Use an Equipment Phase
Command (PCMD) instruction
to give a command. Or use
RSLogix 5000 software.
PSC
Use the Phase State Complete
(PSC) instruction to signal
when a state is done. See
page 59
for more information.
Abort
Aborting
donedone
46Publication LOGIX-UM001B-EN-P - April 2010
Page 47
Example 1: Add Water to a Tank
The holding state does three things.
1. Rung 0 — stop the water.
2. Rung 1 — unlock the devices from program control.
3. Rung 2 — signal that the state is done.
GuidelinesChapter 3
Example 2: Smart Belt
At the last step of the resetting state:
• the SFR instruction resets the SFC
so it is ready for the next time you
need it.
• the PSC instruction signals that the
state is done.
Note: The P1 qualifier runs the actions
only one time.
Publication LOGIX-UM001B-EN-P - April 201047
Page 48
Chapter 3Guidelines
Equipment Interface Tag
Guidelines
Equipment Phase
Directs the actions of the
equipment (what to do and
when)
• produce product
• stop producing product
• add water to a tank
• wait for the operator to do
An equipment interface tag links an equipment phase to an equipment
program.
• The equipment phase uses the tag to configure and command the
equipment program.
• The equipment program uses the tag to report its status or condition.
You are here.
Interface Tags
Links equipment phase to
equipment program
• jog at this speed
• go to the 1 state (run
pump)
• axis is jogging
• valve is faulted
Equipment Program
Does the actions for a specific
group of devices (does it)
• jog axis
• run pump
• open valve
• calculate control variable
GuidelineDetails
List the values that your equipment phase
must give to the equipment program or get
back from it.
Create a user-defined data typeA user-defined data type lets you make a template for your data. It lets you group related
Think of these values as a faceplate to the equipment program. It is the values that your
equipment phase uses to control and monitor the equipment program. Do not include I/O
data.
Inputs to the equipment programOutputs from the equipment program
• mode requests
• set points
• commands such as on, off, start,
stop, reset
• permissives
• overrides
data into a single data type. You then use the data type to make tags with the same data
lay-out.
If you have more than one equipment phase, lay out the data type so that it’s easy to use
with more than one equipment phase. Consider the following:
• Include a range of data that makes the data type more versatile.
• Use names that are as general as possible.
Example: The name State_Cmnd lets you use it for any equipment that runs in 2
states like on/off, running/not running, pumping/not pumping. It is easier to re-use
than names such as Open or Close. Those names apply to valves but not pumps or
motors.
• mode status
• control values
• done or completion
• alarms
• faults
• health indication
• totals or accumulated values
48Publication LOGIX-UM001B-EN-P - April 2010
Page 49
GuidelineDetails
Create a tag for each equipment phaseCreate tag for the interface data of each equipment phase.
• Make a tag for each equipment phase.
• Use the data type from guideline .
• Make the tag at the controller scope. Both the equipment phase and the equipment
program must get to the tag.
• Consider using alias tags. See Alias Tag Guidelines on
There is an interface tag for each axis and
one for the entire machine.
Interface tag for each axis
Interface tag for entire machine
One tag stores the data that is shared by the equipment phase and equipment program.
Other tags store the data for each individual axis.
Publication LOGIX-UM001B-EN-P - April 201051
Page 52
Chapter 3Guidelines
Example 2: Smart belt, Continued
The equipment program gets the command
from the equipment phase and passes it to
each axis.
Routine of the equipment program
This tagIs the interface between
My_Equipmentequipment phase and equipment program
Coarse_Belt_Varsequipment program and an axis
The equipment program collects the fault
status of each axis and passes it back to
the equipment phase.
Routine of the equipment program
The equipment program checks the fault code of each axis. If an axis isn’t faulted, the OK bit
for the axis turns on.
The equipment program collects the OK status of each axis. If the OK bit of each axis = on,
then My_Equipment.Faulted = off (no faults).
52Publication LOGIX-UM001B-EN-P - April 2010
Page 53
GuidelinesChapter 3
Alias Tag Guidelines
Program-scoped tags and phase-scoped tags make your code easier to reuse.
Make the tags aliases for tags at the controller scope. If you reuse the
equipment phase (for example, copy/paste), simply point the phase-scoped
tags to new tags at the controller scope. This reduces address fixes within the
code.
Example
The controller automatically makes a tag for an equipment phase. The tag is at
the controller scope (controller tag). Suppose you plan to reuse an equipment
phase for a different part of your tank.
1. Make an alias tag for the first equipment phase. Make the tag at the
phase scope and point it to the controller tag for that equipment phase.
2. Use the alias tag throughout the code of the equipment phase (This
Phase).
3. Make a copy of the equipment phase.
4. Point the alias tag of the copy to its controller tag.
Publication LOGIX-UM001B-EN-P - April 201053
Page 54
Chapter 3Guidelines
Additional Resources
For this informationSee this publication
Guidelines and considerations for alias tags Logix5000 Controllers Design
Considerations, publication
Steps to assign alias tagsLogix5000 Controllers Common Procedures
Instruction structurelists control status bits and values, if any, of the instruction
Descriptiondescribes the instruction’s use
Arithmetic status flagsdefines whether or not the instruction affects arithmetic status flags
Fault conditionsdefines whether or not the instruction generates minor or major faults
Executiondefines the specifics of how the instruction operates
Exampleprovides at least one programming example in each available programming language
This appendix provides a description of each equipment phase instruction in
this format.
defines any differences when the instruction is enabled and disabled, if appropriate
if so, defines the fault type and code
includes a description explaining each example
Set and Clear
This manual uses set and clear to define the status of bits (booleans) and
values (non-booleans).
This termMeans
setthe bit is set to 1 (ON)
a value is set to any non-zero number
clearthe bit is cleared to 0 (OFF)
all the bits in a value are cleared to 0
If an operand or parameter support more than one data type, the bold data
types indicate optimal data types. An instruction executes faster and requires
less memory if all the operands of the instruction use the same optimal data
type, typically DINT or REAL.
The controller evaluates ladder instructions based on the rung condition
preceding the instruction (rung-condition-in). Based on the rung-condition-in
and the instruction, the controller sets the rung condition following the
instruction (rung-condition-out), which in turn, affects any subsequent
instruction.
input instruction
rung-in
condition
rung-out
condition
output instruction
If the rung-in condition to an input instruction is true, the controller evaluates
the instruction and sets the rung-out condition based on the results of the
instruction. If the instruction evaluates to true, the rung-out condition is true;
if the instruction evaluates to false, the rung-out condition is false.
Use the PSC instruction in each
phase state routine that you add to
an equipment phase.
Without a PSC instruction, the equipment phase remains in the state and does not go to the
next state.
• Place the PSC instruction as the last step in your phase state routine.
• When the state is done (complete), execute the PSC instruction.
In the holding state routine, use
the PSC instruction to let the
equipment phase go to the Held
state.
Remember that the PSC instruction
does not stop the current scan of a
routine.
Do not use a PSC instruction in a
prestate routine.
When the PSC instruction executes, the controller scans the rest of the routine and then
transitions the equipment phase to the next state. The PSC instruction does not termiN/Ate
the execution of the routine.
Use the PSC instruction only to signal the transition from one state to another.
Arithmetic Status Flags: not affected
Fault Conditions: none
Execution:
ConditionRelay Ladder ActionStructured Text Action
prescanThe rung-condition-out is set to false.No action taken.
rung-condition-in is falseThe rung-condition-out is set to false.N/A
rung-condition-in is trueThe instruction executes.
The rung-condition-out is set to true.
scan of structured textN/AIn structured text, instructions execute each time
instruction executionThe instruction signals that the state is complete.The instruction signals that the state is complete.
postscanThe rung-condition-out is set to false.No action taken.
N/A
they are scanned. To limit the scan of an instruction,
use a qualifier of an SFC action and/or a structured
text construct.
States, Substates, and Commands of an Equipment Phase
command
Some states need a command to go to the next state. If the
equipment phase is in the idle state, a start command
transitions the equipment phase to the running state. Once
in the running state, the equipment phase executes its
running state routine.
Other states use a Phase State Complete (PSC) instruction
to go to the next state. If the equipment phase is in the
holding state, a PSC instruction transitions the equipment
phase to the held state. Once in the held state, the
equipment phase needs a restart command to go to the
restarting state.
substate
Use the auto pause, pausing, and paused substates to test and debug a state routine. The
substates require the Equipment Phase Paused (PPD) instruction to create breakpoints in your logic.
The auto pause, pause, and resume commands let you step through the breakpoints.
Guidelines for Using the PCMD Instruction
GuidelineDetails
Limit execution of a PCMD instruction
to a single scan.
Determine if you need to take
ownership of the equipment phase.
Limit the execution of the PCMD instruction to a single scan. Each command applies to only a
specific state or states. Once the equipment phase changes state, the command is no longer
valid. To limit execution:
• execute the PCMD instruction within a P1 Pulse (Rising Edge) or P0 Pulse (Falling Edge)
action.
• place a one shot instruction before the PCMD instruction.
• execute the PCMD instruction and then advance to the next step.
As an option, a program can own an equipment phase. This prevents another program or
FactoryTalk Batch software from also commanding the equipment phase.
If you useThen
FactoryTalk Batch software to also run
procedures (recipes) within this controller
multiple programs to command the same
equipment phase
none of the aboveThere is no need to own the equipment
Before you use a PCMD instruction, use
an Attach to Equipment Phase (PATT)
instruction to take ownership of the
equipment phase. See
See if you must use a POVR
instruction instead of a PCMD
instruction.
A. Are you giving the hold, stop, or abort command?
• NO — Use the PCMD instruction.
• YES — Go to step B.
B. Must the command work even if you have manual control of the equipment phase via
RSLogix 5000 software?
• YES — Use the POVR instruction instead. See
• NO — Go to step C.
C. Must the command work even if FactoryTalk Batch software or another program owns the
equipment phase?
• YES — Use the POVR instruction instead. See
• NO — Use the PCMD instruction.
Example: Suppose your equipment checks for jammed material. And if there is a jam, you
always want the equipment to abort. In that case, use the POVR instruction. This way, the
equipment aborts even if you have manual control via RSLogix 5000 software.
Decide if you want a result code.Use the Result operand to get a code that shows the success/failure of the PCMD instruction.
If youThen in the Result operand, enter a
anticipate ownership conflicts or other
possible errors
do not anticipate ownership conflicts or
other errors
To interpret the result code, see ’PCMD Result Codes’ on
DINT tag in which to store a code for the result of
the execution of the instruction
0
page 68
page 68
page 64
.
.
.
PCMD Result Codes
If you assign a tag to store the result of a PCMD instruction, the instruction
returns one of the following codes when it executes.
If ProcedureB_StepIndex = 20 (The routine is at step 20.)
And this is the transition to step 20 (The ONS instruction signals that the EQU instruction went from false to true.)
Then
Change the state of the Add_Water equipment phase to running via the start command.
If ProcedureB_StepIndex = 20 (The routine is at step 20.)
And the Add_Water equipment phase is complete (Add_Water:Phase.Complete =1)
Then
Change the state of the Add_Water equipment phase to resetting via the reset command.
Advance to step 30.
Structured Text
When the SFC enters Add_Water_Step, change Add_Water
equipment phase to running via the start command. The P1 qualifier
limits this to the first scan of the step.
Before the SFC leaves Add_Water_Step
(Add_Water:Phase.Complete = 1), change Add_Water equipment
phase to resetting via the reset command. The P0 qualifier limits this
to the last scan of the step.
If ProcedureB_StepIndex = 30 (The routine is at step 30.)
And this is the transition to step 30 (The ONS instruction signals that the EQU instruction went from false to true.)
Then
Change the Add_Ingredient equipment phase to running via the start command.
Verify that the command was successful and store the result code in PCMD_Result[1] (DINT tag).
Structured Text
When the SFC enters Add_Ingredient_Step:
• change Add_Ingredient equipment phase to running via the start
command.
• verify that the command was successful and store the result code i
PCMD_Result[2] (DINT tag).
The P1 qualifier limits this to the first scan of the step.
Use the POVR instruction to give a hold, stop, or abort command to an
equipment phase regardless of ownership.
Relay Ladder
OperandTypeFormatDescription
Phase Name phasename of the
equipment
phase
Commandcommandname of the
command
ResultDINTimmediate
tag
Equipment phase that you want to change to
a different state
One of these commands for the equipment
phase:
• Hold
• Stop
• Abort
To let the instruction return a code for its
success/failure, enter a DINT tag in which to
store the result code.
Otherwise, enter 0.
Structured Text
The operands are the same as those for the relay ladder POVR instruction.
Description: The POVR instruction:
• gives the hold, stop, or abort command to an equipment phase.
• overrides all owners of the equipment phase. The command works even
if RSLogix 5000 software, FactoryTalk Batch software, or another
program already own the equipment phase.
Limit execution of a POVR instruction
to a single scan.
Do you want the equipment to hold, stop, or abort even if you have manual control of the
equipment phase via RSLogix 5000 software?
• YES — Use the POVR instruction.
• NO — Use the PCMD instruction.
This also applies to FactoryTalk Batch software or other programs. Use the POVR only when
you must hold, stop, or abort regardless of ownership.
Example: Suppose your equipment checks for jammed material. And if there is a jam, you
always want the equipment to abort. In that case, use the POVR instruction. This way, the
equipment aborts even if you have manual control via RSLogix 5000 software.
Limit the execution of the POVR instruction to a single scan. Each command applies to only a
specific state or states. Once the equipment phase changes state, the command is no longer
valid. To limit execution:
• execute the POVR instruction within a P1 Pulse (Rising Edge) or P0 Pulse (Falling Edge)
action.
• place a one shot instruction before the POVR instruction.
• execute the POVR instruction and then advance to the next step.
POVR Result Codes
If you assign a tag to store the result of a POVR instruction, the instruction
returns one of the following codes when it executes:.
Code (Dec)Description
0The command was successful.
24577The command is not valid.
24578The command is not valid for the current state of the equipment phase.
24594The equipment phase is unscheduled, inhibited, or in a task that is
Arithmetic Status Flags: not affected
Fault Conditions: none
For example, if the equipment phase is in the stopping state, then a
hold command is not valid.
The prestate routine of the equipment phase watches for the equipment program to signal a
fault.
If there is a fault Then
The equipment program watches for the following faults:
• Faulted axis
• Jammed material
If there is a fault, then
Local_Interface.Equipment_Faults_Cleared = 0. This tag is an alias for the
controller-scoped tag Shear_1.
• If Interface_To_Equipment.Equipment_Faults_Cleared = 0 then there is a fault.
• Both Interface_To_Equipment and Local_Interface are aliases for Shear_1, so they have
the same values.
Give the Shear_One_Phase equipment phase the abort command. The POVR instruction
makes sure the command works even if someone has manual control of the equipment
phase through RSLogix 5000 software.
The PFL instruction sets the failure code for Shear_One_Phase = 333.
The Fault_Strobe keeps these actions to a single scan.
Relay Ladder
Structured Text
If NOT
Interface_To_Equipment.Equipment_Faults_Cleared
And NOT Fault_Strobe Then
POVR(Shear_One_Phase,Abort,0);
PFL(333);
End_If;
Fault_Strobe := NOT
Interface_To_Equipment.Equipment_Faults_Cleared;
The PFL instruction sets the failure code for the equipment phase in which you put the
instruction. There is no operand to identify a specific equipment phase.
Typically, put the PFL instruction in a prestate routine for the equipment phase.
• The controller always scans the prestate routine, even when an equipment phase is in the
idle state.
• The controller scans the prestate routine before each scan of a state.
prestate routine
• Use the prestate routine to continuously monitor the health of an equipment phase as you
progress through its states.
Prioritize your failure codes.The PFL instruction sets the failure code only to a value greater than its current value.
• For example, if a PFL instruction sets the failure code = 102, another PFL instruction can
only set the failure code > 102.
• Make sure that you assign higher values to exceptions that require higher priority in their
handling. Otherwise, a lower priority exception may overwrite a more critical exception.
To take action when a failure occurs,
monitor the Failure member of the
PHASE tag.
When you create an equipment phase,
RSLogix 5000 software creates a tag for the
The PFL instruction writes its value to the Failure member of the PHASE tag for the equipment
phase.
To clear the failure code, use a PCLF
instruction.
You must use a PCLF instruction to clear the failure code of an equipment phase. Instructions
such as a CLR or MOV won’t change the failure code. See Equipment Phase Clear Failure
(PCLF) instruction on page 76.
Arithmetic Status Flags: not affected
Fault Conditions: none
Execution:
ConditionRelay Ladder ActionStructured Text Action
prescanThe rung-condition-out is set to false.No action taken.
rung-condition-in is falseThe rung-condition-out is set to false.N/A
rung-condition-in is true• The instruction executes.
• The rung-condition-out is set to true.
scan of structured textN/AIn structured text, instructions execute each time
instruction executionThe instruction sets the value of the failure code for
the equipment phase.
postscanThe rung-condition-out is set to false.No action taken.
N/A
they are scanned. To limit the scan of an instruction,
use a qualifier of an SFC action and/or a structured
text construct.
The instruction sets the value of the failure code for
the equipment phase.
If Drain_Valve.FaultAlarm = 1 (The valve did not go to the commanded state.) then
Failure code for the equipment phase = 102.
If Drain_Tank.Running = 1 (The Drain_Tank equipment phase is in the running state.)
And Drain_Tank.Failure = 102 (failure code for the equipment phase)
Then
Change the state of the Drain_Tank equipment phase to holding via the hold command.
Structured Text
In the prestate routine of an equipment phase…
(*If the drain valve does not go to the commanded
state, then set the failure code of this equipment
phase = 102.*)
If Drain_Valve.FaultAlarm Then
PFL(102);
End_If;
(*If the Drain_Tank equipment phase = running and
its failure code = 102, issue the hold command and
send the equipment phase to the holding state.*)
Description: The PCLF instruction clears the failure code for an equipment phase.
Use the PCLF instruction to clear the failure code of an equipment phase.
Relay Ladder
OperandTypeFormatDescription
Phase Namephasename of the
equipment
phase
Equipment phase whose failure code you
want to clear
Structured Text
The operands are the same as those for the relay ladder PCLF instruction.
• You must use a PCLF instruction to clear the failure code of an
equipment phase.
• A CLR instruction, MOV instruction, or assignment (:=) doesn’t change
the failure code of an equipment phase.
• Make sure the equipment phase doesn’t have other owners when you
use the PCLF instruction. The PCLF instruction won’t clear the failure
code if RSLogix 5000 software, FactoryTalk Batch software, or another
program owns the equipment phase.
ConditionRelay Ladder ActionStructured Text Action
prescanThe rung-condition-out is set to false.No action taken.
rung-condition-in is falseThe rung-condition-out is set to false.N/A
rung-condition-in is true• The instruction executes.
• The rung-condition-out is set to true.
scan of structured textN/AIn structured text, instructions execute each time
instruction executionThe instruction clears the value of the failure code
for the specified equipment phase.
postscanThe rung-condition-out is set to false.No action taken.
N/A
they are scanned. To limit the scan of an instruction,
use a qualifier of an SFC action and/or a structured
text construct.
The instruction clears the value of the failure code
for the specified equipment phase.
Example:
Relay Ladder
If Drain_Tank_Restart = 1 (restart the Drain_Tank equipment phase) then
Clear the failure code of the Drain_Tank equipment phase
Change the state of the Drain_Tank equipment phase to restarting via the restart command.
Drain_Tank_Restart =0.
Structured Text
(*If Drain_Tank_Restart = on, then:
Clear the failure code for the Drain_Tank
equipment phase.
ConditionRelay Ladder ActionStructured Text Action
prescanThe rung-condition-out is set to false.No action taken.
rung-condition-in is falseThe rung-condition-out is set to false.N/A
rung-condition-in is true• The instruction executes.
• The rung-condition-out is set to true.
scan of structured textN/AIn structured text, instructions execute each time
instruction executionThe instruction clears the NewInputParameters bit
of the equipment phase.
postscanThe rung-condition-out is set to false.No action taken.
N/A
they are scanned. To limit the scan of an instruction,
use a qualifier of an SFC action and/or a structured
text construct.
The instruction clears the NewInputParameters bit
of the equipment phase.
Example:
Relay Ladder
If ThisPhase.NewInputParameters = 1 (FactoryTalk Batch software has new input parameters for the equipment phase), then
DataValues[0] = 2. This sets the PXRQ instruction for transfer of control.
Send the Download Input Parameters Subset request to FactoryTalk Batch software. Because DataValues[0] =2,the
instruction is set for transfer of control.
When RQ_Control[0].PC = 1 (The PXRQ instruction is done.), then
ThisPhase.NewInputParameters = 0 via the PRNP instruction.
This is a stored action. It continues to execute even after the SFC leaves
Step_001.
If ThisPhase.NewInputParameters = 1 (FactoryTalk Batch software has new input parameters for
the equipment phase), then
If Enable_PXRQ = 1 (Let the PXRQ instruction execute.)
Or RQ_Control[0]. PC = 0 (The PXRQ instruction is in process.), then
DataValues[0] = 2. This sets the PXRQ instruction for transfer of control.
Send the Download Input Parameters Subset request to FactoryTalk Batch software.
Because DataValues[0] = 2, the instruction is set for transfer of control.
Enable_PXRQ =0(Do not let the PXRQ instruction restart after the request
completes.)
If RQ_Control[0]. PC = 1(The request is complete.), then
ThisPhase.NewInputParameters = 0 via the PRNP instruction.
Otherwise
Enable_PXRQ = 1 (Let the PXRQ instruction execute the next time new input parameters are
available.
Do not use a PPD instruction as a
temporary end of the routine.
Limit the execution of a PPD
instruction to a single scan.
Make sure only 1 PPD instruction
at a time is true.
Choose the correct substate.PPD instructions (breakpoints) work only when the equipment phase is in the pausing
❑
PPD instructions (breakpoints) are easiest to use if your logic moves through defined steps,
such as a state machine or SFC.
• A breakpoint only signals that specific conditions are met. It does not stop the execution
of the equipment phase.
• To have your logic actually break (pause) at a breakpoint, organize your logic so that it
stays at the step at which the breakpoint occurred until you give the resume command.
See the examples on
Even when an equipment phase is paused, it continues to execute all its logic.
• When a PPD instruction executes, it only sets the Paused bit for the equipment phase.
• If you program the PPD instruction in RLL, it disables only the rest of the logic on its rung.
It does not terminate or suspend the execution of the routine.
• Think of the PPD instruction as a condition that you can apply or ignore based on the auto
pause and pause commands.
In the pausing substate, an equipment phase goes to paused at the first PPD instruction
whose conditions are true. If the PPD instruction executes over several scans, the equipment
phase may continually pause at the same breakpoint. (This is different than a One Shot (ONS)
instruction, which executes only on a false-to-true transition.)
A PPD instruction does not have a control tag to remember whether it executed.
• Anytime its conditions are true (and the equipment phase is in the pausing substate), the
PPD instruction acts as a breakpoint (sets the equipment phase to paused).
• Limiting your logic to one possible breakpoint at a time ensures that you pause at the
required breakpoint.
substate:
page 96
.
To pause atGive this commandNotes
Arithmetic Status Flags:
each true
breakpoint
first true
breakpoint
not affected
auto pause• When you start the equipment phase, it
goes to the pausing substate.
• When you give the resume command after a
pause, the equipment phase remains in the
pausing substate.
• To turn off auto pause, give the auto pause
command again.
pause• Give the pause command after you start the
equipment phase.
• To pause at another breakpoint, give the
resume command and then the pause
command.
If the equipment phase is in the pausing substate
And ThisPhase.StepIndex = 20 (The routine is at step 20.)
And FillTime.DN =On
Then the PPD instruction prevents the MOV instruction from moving the routine to step 30 until the equipment phase gets the
resume command. (The routine stays at step 20.)
When the equipment phase gets the resume command, the PPD instruction lets the MOV instruction execute, so the routine
goes to step 30.
Structured Text
If Step_001.DN = 1 (The step ran for the preset time.), then
Use the PATT instruction to take ownership of an equipment phase to either:
• prevent another program or FactoryTalk Batch software from
commanding an equipment phase.
• make sure another program or FactoryTalk Batch software does not
already own an equipment phase.
Relay Ladder
OperandTypeFormatDescription
Phase Name phasename of the
equipment
phase
ResultDINTimmediate
tag
Equipment phase that you want to own
To let the instruction return a code for its
success/failure, enter a DINT tag in which to
store the result code.
Otherwise, enter 0.
Structured Text
The operands are the same as those for the relay ladder PATT instruction.
Description: The PATT instruction lets a program take ownership of an equipment phase.
• Ownership is optional. As long as an equipment phase has no owners,
any sequencer (program in the controller, FactoryTalk Batch software)
can command an equipment phase.
• FactoryTalk Batch software always takes ownership of an equipment
phase.
• Once a sequencer owns an equipment phase, no other sequencer can
command the equipment phase.
Consider ownership if you have
multiple sequencers that use a
common equipment phase.
Ownership makes sure that a program can command all the equipment phases it needs and
locks out any other sequencers.
If you useThen
FactoryTalk Batch software to also run
sequences within this controller
multiple programs to command the same
equipment phase
none of the aboveThere is no need to own the equipment
Before you execute your sequence
(process), take ownership of all the
equipment phases that the sequence
uses.
phases.
Remember that RSLogix 5000
software overrides the controller.
Use the Result operand to validate
ownership.
Avoid or plan for a result code =
24582.
When the sequence is done,
relinquish ownership.
Regardless of whether a program or FactoryTalk Batch software owns an equipment phase,
you can always use RSLogix 5000 software to override ownership and command the
equipment phase to a different state.
Use the Result operand to get a code that shows the success/failure of the PATT instruction.
To interpret the result code, see “PATT Result Codes” on
On each execution, the PATT instruction tries to take ownership of the equipment phase. Once
a program owns an equipment phase, another execution of the PATT instruction produces a
result code = 24582. When you use a PATT instruction, either:
• limit its execution to a single scan to avoid the 24582 result code.
• include in your conditions for ownership a result code = 24582. See the example on
page 100
To relinquish ownership, use a Detach from Equipment Phase (PDET) instruction. See
Each PATT instruction tries to take ownership of an equipment phase.
If the Result of a PATT instruction=0or24582 (the program owns the equipment phase), then
A bit within the Ownership tag = 1. (In the Ownership tag, each equipment phase is assigned a bit.)
If Ownership = 3 (The program owns both equipment phases as shown by bits 0 and 1.), then:
Done = 1. (This signals the sequence to go to the next step.)
100Publication LOGIX-UM001B-EN-P - April 2010
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.