Home
LOGIX-UM001A-EN-P, PhaseManager User Manual
Contents
1. If you want to Then check this Datatype Notes member see if an Acquire Resources request is in AcquireResources BOOL Read only process via a PXRQ instruction see if an Release Resources request is in ReleaseResources BOOL Read only process via a PXRQ instruction see if a Send Message To Linked Phase SendMessageToLinked BOOL Read only request is in process via a PXRQ instruction Phase see if a Send Message To Linked Phase And SendMessageToLinked BOOL Read only Wait request is in process via a PXRQ PhaseAndWait instruction see if a Receive Message From Linked Phase ReceiveMessageFrom BOOL Read only request is in process via a PXRQ instruction LinkedPhase see if a Cancel Message To Linked Phase CancelMessageToLinked BOOL Read only request is in process via a PXRQ instruction Phase see if a Send Message To Operator requestis SendMessageloOperator BOOL Read only in process via a PXRQ instruction see if a Clear Message To Operator request is ClearMessageToOperator BOOL Read only in process via a PXRQ instruction see if a Generate E Signature request is in GenerateESignature BOOL Read only process via a PXRQ instruction see if a Download Batch Data request is in DownloadBatchData BOOL Read only process via a PXRQ instruction see if a Download Material Track Data DownloadMaterialTrack BOOL Read only Container In Use request is in process via a DataContainerlnUse PXRQ instruction see if a Download C
2. PO Action_005 PCMD Add Ingredient Reset PCMD Result 3 mj Add_Ingredient_Step Tran_002 Add Ingredient Complete When the SFC enters Add_ ngredient_Step e Change Add_ ngredient equipment phase to running via the stari command e Verify that the command was successful and store the result code in PCMD_Result 2 DINT tag The P1 qualifier limits this to the first scan of the step Publication LOGIX UM001A EN P May 2005 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 13 Equipment Phase Override Use the POVR instruction to give a hold stop or abort command to an equipment phase regardless of ownership Command POVR BT ce 2 p Operands Relay Ladder OVR Operand Type Format Description Equipment Pr oO ide C d M EER ESR ones Phase Name phase name of the Equipment phase that you want to change to Command equipment a different state Result phase Command command name ofthe One of these commands for the equipment command phase e hold e stop e abort Result DINT immediate To let the instruction return a code for its tag success failure enter a DINT tag in which to store the result code Otherwise enter 0 POVR PhaseName Structured Text Command Result The operands are the same as those for the relay ladder POVR instruction Description The POVR instruction e Gives the hold stop or abort command to an equipment phase e Over
3. Step 5 Step 6 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 Equipment Program Directs the actions of the Does the actions for a specific equipment what to do and p gt group of devices does it when e jog axis e produce product e run pump e stop producing product a open valve e add water to a tank e calculate control variable e wait for the operator to do something To start the equipment the equipment phase gives the equipment program a start CH CH CH command a set point etc C4 e A aaia a as The equipment program sends back 4 Ga information such as current state total etc S The equipment program controls the equipment Publication LOGIX UM001A EN P May 2005 3 10 Guidelines Example 1 Add water to a tank The equipment phase tells the equipment program to go to program mode and add water F E Controller MyPhaseManager Tasks tal MainTask S _ Action_001 i Add_Water ater Feed Prog Req 1 Phase Tags E Prestate_Routine Eg Holding Eig Resetting Eig Restarting ey Running i Heat Ry
4. Data Type EM_General_2State _ O x BOOL Name JEM_General_25tate Description 4 Members Name Data Type Ei Prog_Rieq State_Cmnd BOOL Decimal ProgOper BOOL Decimal Fault BOOL Decimal Health BOOL Decimal State Decimal 3 A tag stores the data that is shared by the equipment phase and equipment program The tag uses the user defined data type from step 2 G E water_Feed_Y1 Data Type EM_General_2State ater_Feed_V 1 Prog_Req BOOL ater_Feed_ 1 State_Cmnd BOOL ater_Feed_1 ProgOper BOOL ater_Feed_ 1 Fault BOOL ater_Feed_V1 Health ater_Feed_ 1 State BOOL BOOL 4 gt Mo nitor Tags Publication LOGIX UM001A EN P May 2005 AEdit Tags A Guidelines 3 29 Example 2 Smart belt 1 The equipment phase and Equipment program interface equipment program share this data Commands Conditions or status Enable Abort FaultScroll EnableCyclingDone Disable FaultReset Faulted DisableCyclingDone Home Stop EnableDone AbortingDone ActivateRun ArmRegistration DisableDone FaultResetDone EnableProduct HomeDone StoppingDone DisableProduct ActivateRunDone Selected EnableCycling EnableProductDone RegistrationArmed DisableCycling DisableProductDone 2 A separate user defined data type Axis interface holds data for each axis Commands Conditions or status
5. Either of the following occur e RSBizWare Batch software completes its processing of the request PC 1 e Anerror occurs ER 1 O The rung condition in goes false e EN remains 1 e RSBizWare Batch software continues processing the request IP 1 The rung condition in goes false Either of the following occur e RSBizWare Batch software completes its processing of the request PC 1 e An error occurs ER 1 Since the rung condition in is false EN 0 Description The PXRQ instruction sends a request to RSBizWare Batch software Publication LOGIX UM001A EN P May 2005 A 26 Guideline Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Guidelines for Using the PXRQ Instruction Details L Make sure to use an array for the Data Values operand The Data Values operand requires a DINT array even if the array contains only 1 element i e the data type is DINT 1 Q In relay ladder condition the instruction to execute ona transition This is a transitional instruction Each time you want to execute the instruction toggle the rung condition in from false to true Q In structured text use a construct to condition the execution of the instruction If you want to When you program a PXRQ instruction in structured text consider the following e In structured text instructions execute each time they are scanned e
6. Enable Abort State NoMotion MoveActive Disable Stop On Homed HomeDone Home ActivateRun Ok AxisSelected RunDone AutoRun Auto GearActive ResetFaults Jogging CamActive 3 There is an interface tag for each One tag stores the data that is shared by the equipment phase and equipment program axis and one for the entire machine Other tags store the data for each individual axis lolx Interface tag for each axis lt Interface tag for entire machine Scope Eg My_Equpment F Show UDT_Equpment_Interface UD Exit_Belt_Vars Coarse_Belt_Vars Data Type UDT_Axis_Interface A UDT_ xis_Interface Fine_Belt_Vars UDT_Axsis_Interface H My_ Equipment nm UDT_Equpment_Interface Monitor Tags vie_Intarfare h cat Tage AI MINT a m ZZ Publication LOGIX UM001A EN P May 2005 3 30 Guidelines 4 The equipment program gets the command from the equipment phase and passes it to each axis My_Equipment FaultReset 5 The equipment program collects the fault status of each axis and passes it back to the equipment phase Publication LOGIX UM001A EN P May 2005 Coarse_Belt_Vars sc ResetF aults Example 2 Smart belt Continued Routine of the equipment program This tag Is the interface between My_Equipment equipment phase and equipment program Coarse_Belt_Vars equipment program and an axis Coarse_Belt_Vars sc ResetF aul
7. PhaseManager uses the following transitions Done No command Use PSC instruction instead Hold Your equipment can go from any Holding state in the box to the stopping or aborting state Hold Restarting Restart Abort Fault specific use of the abort Abort command Aborting Reset Stopped Aborted Description Command A 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 uses these commands reset stop restart start hold abort Done Equipment 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 Fault A 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 Publication LOGIX UM001A EN P May 2005 Introduction 1 7 Can manually change Yes RSLogix 5000 software has a window that lets you monitor and states command an equipment phase State that the equipment phase is in right now
8. Servo Motors Kinetix 6000 Multi Axis Servo Drives N ae ae Publication LOGIX UM001A EN P May 2005 3 4 Guidelines Fill out the state model for each equipment phase Guideline 1 Fill out 1 state model for each 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 Details Each phase runs its own set of states Fill out 1 state model worksheet for each phase phase 2 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 tart Hold Hold Restart L_ Restarting meee if Stop Abort Abort Aborting 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 e idle default e complete e stopped Choose the initial state that best shows what your equipment is waiting to do after power up reset run etc Publication LOGIX UM001A EN P May 2005 Guideline 3 Start with the initial state and work through the model 4 Use only the states that you want Guidelines 3 5 Details Start with the initial state Then work fo
9. The restarting state goes to the running state when it s done Publication LOGIX UM001A EN P May 2005 Use the Phase State Complete PSC instruction to signal when a state is done See page A 5 for more information Guideline 1 A PCMD instruction causes a transition right away Guidelines 3 19 Details 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 2 See if you need to reset the state that you ve left Are you leaving an acting state e g running holding e YES Consider resetting the code of the state that you ve left e 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 etc 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
10. To manually change states fY Equipment Phase Monitor My_Phase 1 Take ownership of the equipment quipment Phases Ofiner s RSLogix 5000 1 phase ziy Phase 2 Give a command Complete Stopping What is ownership Equipment Phase Monitor My Phase l x Ser Phases ier s RSLogix 5000 1 Running Holding Takes ownership h Siesta ti My Code Can t command Publication LOGIX UM001A EN P May 2005 1 8 Introduction What if my equipment doesn t fit the state model Publication LOGIX UM001A EN P May 2005 Ownership locks out programs or RSBizWare Batch software from giving commands to an equipment phase If this owns the equipment phase Then RSLogix 5000 software Sequencers can t give commands to the equipment phase This includes e Internal sequencer program in the controller e External sequencer RSBizWare Batch software Internal sequencer program in the Other sequencers can t give commands to the controller equipment phase External sequencer RSBizWare Batch Other sequencers can t give commands to the software equipment phase Exception Use an Equipment Phase Override Command POVR instruction to give a hold stop or abort command regardless of ownership See these instructions e Equipment Phase Command PCMD instruction on page A 8 e Equipment
11. a Restarting ay Running amp Stopping A Program Tags E Main_Routine B Clear _Axis_Faults B Disable_Axes B Enable_Axes B Home_Axes B Stop_Axes Example 1 Add water to a tank The holding state does 3 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 VWater_Feed State_Cmnd Water_Feed Prog_Req Example 2 Smart belt cS My_Equpment_Program B Check_for_Axis_Faults PO Tum_On_Axes_Reset_001 Ui i ly_Equipment Home 0 At the last step of the resetting state e The SFR instruction resets the SFC so it is ready for the next time you need it e The PSC instruction signals that the state is done Ome EFR Resetting 0 PSC 3 Step_004 Note The P1 qualifier runs the actions only one time Publication LOGIX UM001A EN P May 2005 3 26 Guidelines Create equipment interface An equipment interface tag links an equipment phase to an equipment program tags e The equipment phase uses the tag to configure and command the equipment program e The equipment program uses the tag to report its status or condition You are here Equipment Phase Interface Tags Equipment Program Directs the actions of the Links equipment phase to Does the actions for a specific equipment what to do and
12. choose 3 4 set 2 6 initial step index set C 2 monitor equipment phase 2 3 0 override command example 3 23 ownership overview 1 7 take with RSLogix 5000 software 1 7 P parameters download or upload A 23 A 34 PATT instruction A 42 PCLF instruction A 21 PCMD instruction A 8 PDET instruction A 47 PFL instruction A 17 PFL instructon use 3 15 phase See equipment phase PHASE data type members B 2 set or clear values B 1 use a state bit 3 14 phase state complete instruction A 5 phase state routine add 2 2 POVR instruction A 13 PPD instruction A 37 prestate routine add 3 13 assign 3 14 example 3 16 3 17 3 22 3 23 overview 3 12 use 3 12 PRNP instruction A 34 producing state set up 3 4 program equipment phase 3 9 PSC instruction A 5 PXRO instruction A 23 hold action C 3 lost communication C 3 report send A 23 resetting state use 1 5 restarting state use 1 5 3 12 routine add phase state routine 2 2 RSBizWare Batch software external request A 23 report A 23 RSLogix 5000 software give command 2 3 monitor an equipment phase 1 7 2 3 ownership 1 7 running state use 1 5 S sequencer example 3 21 Index 3 set hold action for a PXRQ instruction C 3 initial step index C 2 PHASE tag values B 1 set up equipment interface tag 3 26 equipment phase 3 2 states 3 4 transitions 3 18 standby state set up 3 4 state model See states state routine See phase state routine states compared
13. publication CNET UM001 control devices over an DeviceNet network DeviceNet Modules in Logix5000 Control Systems User Manual publication DNET UM004 Publication LOGIX UM001A EN P May 2005 Preface 2 Purpose of This Manual Who Should Use this Manual How to 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 e lay out your code in sections that include equipment phases e set up a state model for your equipment e program your equipment to run by the state model e use equipment phase instructions to transition to a different state handle faults set up break points etc A Logix5000 controller is any of the following e 1756 ControlLogix controllers e 1769 CompactLogix controllers e 1789 SoftLogix5800 controllers e 1794 FlexLogix controllers e 20D PoweFlex 7008S with DriveLogix controllers This manual is for those who program or maintain industrial automation systems To use this manual you must already have experience with e programmable controllers e industrial automation systems e personal computers As you use this manual you will see some terms that are formatted differently from the rest of the text Text that is Identifies For example Means Italic the actual name of an item that you Right click User Defined Right click on the item that is named see on your screen
14. try out PhaseManager chapter 2 detailed reference of equipment phase instructions appendix A description of the members of the PHASE data type appendix B Publication LOGIX UM001A EN P May 2005 1 10 Introduction Notes Publication LOGIX UM001A EN P May 2005 Chapter 2 PhaseManager Quick Start Purpose of this chapter Use this quick start to e Get an introduction to how an equipment phase runs e Monitor an equipment phase e Manually tell an equipment phase to go to a different state When to use this chapter Use this quick start when you want to e Try out PhaseManager for the first time e Test an equipment phase by manually stepping through its states How to use this chapter To use this quick start Action Page Create an Equipment Phase 2 2 Create a State Routine 2 2 Manually Step Through the States 2 3 Configure the Initial State for an Equipment 2 6 Phase Equipment To use this quick start you need e Logix5000 controller See the preface if you aren t sure which controllers are Logix5000 controllers e Firmware 15 0 or later for the controller e Power supply for the controller e Communication path to the controller Communication card or built in port Corresponding communication cable e RSLogix 5000 software 15 0 or later Publication LOGIX UM001A EN P May 2005 2 2 PhaseManager Quick Start Create an Equipment Phase 3 6 Controller MyController Controller Tags EI Contr
15. 212 5201 Headquarters for Allen Bradley Products Rockwell Software Products and Global Manufacturing Solutions Americas Rockwell Automation 1201 South Second Street Milwaukee WI 53204 2496 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Europe Middle East Africa Rockwell Automation SA NV Vorstlaan Boulevard du Souverain 36 1170 Brussels Belgium Tel 32 2 663 0600 Fax 32 2 663 0640 Asia Pacific Rockwell Automation Level 14 Core F Cyberport 3 100 Cyberport Road Hong Kong Tel 852 2887 4788 Fax 852 2508 1846 Headquarters for Dodge and Reliance Electric Products Americas Rockwell Automation 6040 Ponders Court Greenville SC 29615 4617 USA Tel 1 864 297 4800 Fax 1 864 281 2433 Europe Middle East Africa Rockwell Automation Herman Heinrich Gossen Strasse 3 50858 K ln Germany Tel 49 0 2234 379410 Fax 49 0 2234 3794164 Asia Pacific Rockwell Automation 55 Newton Road 11 01 02 Revenue House Singapore 307987 Tel 65 6356 9077 Fax 65 6356 9011 Publication LOGIX UM001A EN P May 2005 PN 957899 90 Supersedes Publication Copyright 2005 Rockwell Automation Inc All rights reserved Printed in the U S A Al le n B ra dle y PhaseManager User Manual
16. 3 attribute ID Publication LOGIX UM001A EN P May 2005 A 30 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET If you want to Then configure the PXRQ instruction as follows External Request Data Value Value Array Element upload lot attribute Upload Material Track Database DINT O 6 Data DINT 1 report ID that has the value DINT 2 controller ID DINT 3 attribute ID upload container attribute Upload Material Track Database DINT O 8 Data DINT 1 report ID that has the value DINT 2 controller ID DINT 3 attribute ID upload container priority Upload Material Track Database DINT O 9 assignment Data DINT 1 report ID that has the value DINT 2 material ID DINT 3 container ID DINT 4 feed type Publication LOGIX UM001A EN P May 2005 add to container 1 distribute from container 2 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 31 PXROQ Error Codes ERR hex EXERR hex Description Recommended Action 00 0000 The PXRQ instruction was aborted before it None sent the request to RSBizWare Batch software 01 0000 The PXRQ instruction was aborted after it None sent the request to RSBizWare Batch software 02 0000 2 or more PXRO instructions executed at the Limit execution to 1 PXRQ instruction at a time same time using the same request type 03 0110 Communication er
17. 3 21 3 22 give 1 6 A 8 give with PCMD instruction 3 18 give with RSLogix 5000 software 2 3 complete state use 1 5 configure equipment phase C 1 create equipment phase 2 2 phase state routine 2 2 D detach from equipment phase instruction A 47 E equipment module See equipment program equipment phase add prestate routine 3 13 compared to PackML 1 9 compared to S88 1 9 configure C 1 create 2 2 create a phase state routine 2 2 data type B 2 define your states 3 4 download or upload paramters A 23 faults 3 12 Index give a command A 8 handle faults 3 12 inhibit C 2 initial state 2 6 instructions 1 1 lay out 3 2 lay out the code 3 9 monitor 1 7 2 3 new input parameters bit A 34 number 3 2 override command 3 20 overview 1 1 ownership A 42 A 47 parameters A 23 A 34 pause A 37 phase state routine 2 2 relinquish ownership A 47 set a breakpoint A 37 set a failure code 3 15 set initial step index C 2 set or clear tag values B 1 set the initial state 2 6 set the prestate routine 3 14 set up 3 2 start 3 21 3 22 states 1 4 take ownership A 42 test states 2 3 use 3 2 equipment phase clear failure instruction A 21 equipment phase command instruction A 8 equipment phase external request instruction A 23 equipment phase failure instruction A 17 equipment phase instructions overview 1 1 PATT A 42 PCLF A 21 PCMD A 8 PDET A 47 PFL A 17 POVR A 13 PPD A 37 PRNP A 34 PSC A 5 PXRO A 23 equipment phas
18. BOOL _ Drain Tank Holding 0 BOOL _ Drain Tank Restarting 0 BOOL __ Drain_Tank Stopping 0 BOOL _ Drain TankAborting 0 BOOL _ Drain Tank Resetting 0 BOOL _ Drain Tark ldie 1 BOOL _ Drain Tank Held 0 BOOL _ Drain Tank Complete 0 BOOL _ Drain_Tank Stopped 0 BOOL Drain_Tank Aborted 0 BOOL amp Drain_Tank Substate 0 DINT _ Drain_Tank Pausing 0 BOOL _ Drain Tank Paused 0 BOOL Tbe Terk AutoPause ofpooL P ieDrein Terk Stepindex DINT Foe Dran Terk Fale 102 BINT i bantamo oN yy Publication LOGIX UM001A EN P May 2005 A 18 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Guidelines for Using the PFL Instruction Guideline Details Q Put the PFL instruction in the The PFL instruction sets the failure code for the equipment phase in which you put the equipment phase instruction There is no operand to identify a specific equipment phase Typically put the PFL instruction in a prestate routine for the equipment phase e The controller always scans the prestate routine even when an equipment phase is in the idle state e The controller scans the prestate routine before each scan of a state prestate routine current state routine e Use the prestate routine to continuously monitor the health of an equipment phase as you progress through its states QO Prioritize your failure codes The PFL instruction sets the failure code only to a value g
19. O40 Poe ORME SG 2 3 ACHONS ga 0 3 ae goa dn abel anne aa EE RRR ae Rohm D 2 3 Configure the Initial State for an Equipment Phase 2 6 Chapter 3 Purpose of this chapter kn eta bs as Sei Re 3 1 When to use this CHaprer 6 0a 3 9 ead Sa ems Mhoe ae beets 3 1 How to use this chapter oot4 Sabah eat e a 3 1 Use a separate equipment phase for each activity 3 2 Examples Tankera 944422 y rapi aeg an EURE DS 3 3 Example 2 Smart belt n n a eh ep Aes he s Sm Ase des 3 3 Fill out the state model for each equipment phase 3 4 State Model Worksheet cer dy mad yom ve Dale eee Hes 3 6 State Model Worksheet nnna naaa 3 7 State Model Worksheet nnna aaau 3 8 Separate equipment phase code from equipment code 3 9 Example 1 Add water to a tank 4420 ice e g ee is 3 10 Example 2 Smart belt o anaana aaa 3 11 Separate normal execution from exceptions 3 12 Example 1 Add water to a tank 4 6 hte Siete ees 3 16 Example 2 Smart belt pa sae eg deg oh Sag Gun ed op ddan 4 3 17 Use the PCMD instruction to transition to a different state 3 18 Example A Tank yet ae he aon KAP E E A 3 21 Example 2 Smart belt nanana aana 3 22 Example 3 Jam Detection n a ae e aaa 3 23 Publication LOGIX UM001A EN P May 2005 Table of Contents 2 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PX RO PRNP PPD PATT PDET PHASE Data Type Configure an Equipment Phase Publication LOG
20. PRNP instruction to clear the bit Arithmetic Status Flags not affected Fault Conditions none Publication LOGIX UM001A EN P May 2005 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 35 Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e The instruction executes na e The rung condition out is set to true scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction clears the NewlnputParameters bit of the equipment phase The instruction clears the NewlnputParameters bit of the equipment phase postscan The rung condition out is set to false Example Relay Ladder No action taken If ThisPhase NewlnputParameters 1 RSBizWare 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 RSBizWare Batch software Since DataValues 0 2 the instruction is set for transfer of control When AQ_Control 0 PC 1 The PXRQ instruction is done then This
21. Phase Override Command POVR instruction on page A 13 e Attach to Equipment Phase PATT instruction on page A 42 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 e The state model defines the general behavior commands and status of the equipment e You program the details of the equipment within that framework How does PhaseManager compare to other state models Introduction 1 9 The following table compares PhaseManager s state model to other common state models 88 C ti lt lt i Pae o PhaseManager O ide Starting Ready Resetting Sde Running Complete Producing Running Complete Pausing Paused Standby subroutines breakpoints or both Holding Held Holding Held Holding Held Restarting none Restarting Stopping Stopped Stopping Stopped Stopping Stopped Aborting Aborted Aborting Aborted Aborting Aborted How do get started To get started with PhaseManager 1 Install RSLogix 5000 software 15 0 or later 2 See the rest of this manual For this information See
22. The PXRQ instruction updates its status bits on y when it is scanned To keep the instruction from repeatedly executing but ensure that the status bits update enclose the instruction in a construct that e initiates the execution of the instruction on y on a transition change in conditions e remains true until either PC 1 or ER 1 Configure the PXRQ Instruction For more information about PXRQ requests see RSBizWare Batch PhaseManager User s Guide publication BATCHXUMA008 EN P Then configure the PXRQ instruction as follows External Request Data Value Value Array Element download all input parameters Download Input Parameters DINT O 0 download a single input parameter Download Input Parameters DINT O parameter ID download a range of input Download Input Parameters DINT O parameter ID of the first parameter parameter DINT 1 number of values download the input parameters Download Input Parameters Subset DINT 0 start 1 configured for automatic download transfer of control 2 on start or transfer of control download all output parameter Download Output Parameter Limits DINT 0 0 limits download a single output Download Output Parameter Limits DINT 0 parameter ID parameter limit upload all reports Upload Output Parameters DINT O 0 upload a single report Upload Output Parameters DINT O report ID upload a range of reports Upload Output Parameters DINT O report ID of the first report DINT 1 numb
23. also commanding the equipment phase If you use Then RSBizWare Batch software to also run Before you use a PCMD instruction use procedures recipes within this controller an Attach to Equipment Phase PATT instruction to take ownership of the multiple programs to command the same equipment phase See page A 42 equipment phase none of the above There is no need to own the equipment phase OQ See if you must use a POVR instruction instead of a PCMD instruction A Are you giving the hold stop or abort command e NO Use the PCMD instruction e YES Go to step B B Must the command work even if you have manual control of the equipment phase via RSLogix 5000 software e YES Use the POVR instruction instead See page A 13 e NO Go to step C C Must the command work even if RSBizWare Batch software or another program owns the equipment phase e YES Use the POVR instruction instead See page A 13 e 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 Q 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 you Then in the Result operand enter a anticipate ownership confl
24. an additional level of technical phone support for installation configuration and troubleshooting we offer TechConnect Support programs For more information contact your local distributor or Rockwell Automation representative or visit http support rockwellautomation com Installation Assistance If you experience a problem with a hardware module within the first 24 hours of installation please review the information that s contained in this manual You can also contact a special Customer Support number for initial help in getting your module up and running United States 1 440 646 3223 Monday Friday 8am 5pm EST Outside United Please contact your local Rockwell Automation representative for any States technical support issues New Product Satisfaction Return Rockwell tests all of its products to ensure that they are fully operational when shipped from the manufacturing facility However if your product is not functioning and needs to be returned United States Contact your distributor You must provide a Customer Support case number see phone number above to obtain one to your distributor in order to complete the return process Outside United Please contact your local Rockwell Automation representative for States return procedure www rockwellautomation com Corporate Headquarters Rockwell Automation 777 East Wisconsin Avenue Suite 1400 Milwaukee WI 53202 5302 USA Tel 1 414 212 5200 Fax 1 414
25. controller internal sequencer none RSBizWare Batch software external none sequencer 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 page A 44 Q Avoid or plan for a result code 24582 Q When the sequence is done relinquish ownership 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 e Limit its execution to a single scan to avoid the 24582 result code e Include in your conditions for ownership a result code 24582 See the example on page A 45 To relinquish ownership use a Detach from Equipment Phase PDET instruction See page A 47 Publication LOGIX UM001A EN P May 2005 A 44 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Arithmetic Status Flags PATT Result Codes If you assign a tag to store the result of a PATT instruction the instruction returns one of the following codes when it executes Code Dec Description 0 The command was successful 24579 RSLogix 5000 software already owns the equipment phase e This program now also owns the equipment phase e Since RSLogix5000 software is higher priority than a program the program cannot command the equipment
26. e 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 3 Create a tag for each equipment phase For more information Create tag for the interface data of each equipment phase e Make a tag for each equipment phase e Use the data type from guideline 2 e Make the tag at the controller scope Both the equipment phase and the equipment program must get to the tag e Consider using alias tags See Use alias tags on page 3 31 For this information See this publication guidelines and considerations regarding Logix5000 Controllers Design e user defined data types Considerationsl 1756 RM094 e alias tags step by step procedures on how to Logix5000 Controllers Common Procedures e create user defined data types publication 1756 PM001 e assign alias tags Publication LOGIX UM001A EN P May 2005 3 28 Guidelines Example 1 Add water to a tank 1 The equipment phase and equipment program share this data as Water_Feed X lt OET Go to program mode gt Go to this state P In program mode No faults Hardware OK q In this state lt cL 2 A user defined data type creates a template for the data
27. equipment phase from control by this window Publication LOGIX UM001A EN P May 2005 2 6 PhaseManager Quick Start Configure the Initial State for an Equipment Phase Publication LOGIX UM001A EN P May 2005 The initial state is the first state to which the equipment phase goes after power up C Controller MyController 3 8 Tasks MainTask E MainProgram Pere 1 i EI Unscheduled rams Phases L _ Finalize All Edits in Phase Ctrl Shift F Properties N fal Equipment Phase Properties My_Phase oO x 2 Ss e PE Conifigquration Parameters Monitor Assigned Routines Prestate krone gt X Fault lt none gt Y I Inhibit Equipment Phase A Initial State Stopped ba 3 Select your initial state te Sten bored So at Complete Initial StepNadex dle Sto pi ped External Sequencerte Communication Command lt none gt External Request Hold Action lt none gt ba m ejaj Cancel Apply Help y Chapter 3 Purpose of this chapter When to use this chapter How to use this chapter Guidelines To guide your development and programming of a Logix5000 project that uses equipment phases Use this chapter e Before you lay out the equipment phases for your Logix5000 project e As a reference while you program the project Review the following guidelines before you lay
28. handle faults etc PSC POVR PCLF PRNP PATT PCMD PFL PXRQ PPD PDET Ce My_Equipment_Program Other code does the specific actions of your equipment Water Feed Conveyor Enable Axes Publication LOGIX UM001A EN P May 2005 1 2 Introduction Here s some PhaseManager terms Term Description equipment phase An equipment phase is similar to a program e You run the equipment phase in a task e You give the equipment phase a set of routines and tags An equipment phase is different from a program in these ways e The equipment phase uses a state model e Use an equipment phase to do 1 activity of your equipment state model A state model divides the operating cycle of your equipment into a set 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 The state model of an equipment phase is similar to these state models e U S standard ISA 88 01 1995 and its IEC equivalent IEC 61512 1 1998 commonly referred to as S88 e PackML which was previously under the supervision of OMAC but is now a working group within ISA state machine The controller has an embedded state machine for the equipment phase This makes it a lot easier to use the state model The state machine e calls the main routine state
29. instruction to transition the equipment phase to the complete state Publication LOGIX UM001A EN P May 2005 A 6 Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Guideline Guidelines for Using the PSC Instruction Details Q 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 e Place the PSC instruction as the last step in your phase state routine e When the state is done complete execute the PSC instruction Hold i Restarting Stopping Complete Auto Pause Stopped Abort Aborting Aborted In the holding state routine use the PSC instruction to let the equipment phase go to the Held state Abort L Remember that the PSC instruction does not stop the current scan of a routine execution of the 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 Q Do notuse a PSC instruction in a prestate routine Arithmetic Status Flags not affected Fault Conditions none Use the PSC instruction only to signal the transition from one state to another Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is
30. member for the equipment phase N Ei Drain_T ank Failure 102 DINT Publication LOGIX UM001A EN P May 2005 Guideline Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Details A 19 O 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 tchange the failure code See Equipment Phase Clear Failure PCLF instruction on page A 21 Arithmetic Status Flags not affected Fault Conditions none Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e The instruction executes na scan of structured text e The rung condition out is set to true na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution postscan The instruction sets the value of the failure code for the equipment phase The rung condition out is set to false The instruction sets the value of the failure code for the equipment phase No action taken Publication LOGIX UM001A EN P May 2005 A 20 Equipment Phase Instructions PSC PCMD POVR PFL P
31. met It does not stop the execution of the equipment phase e 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 page A 41 Do notuse a PPD instruction as a temporary end of the routine Even when an equipment phase is paused it continues to execute all its logic e When a PPD instruction executes it only sets the Paused bit for the equipment phase e f 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 e Think of the PPD instruction as a condition that you can apply or ignore based on the auto pause and pause commands Q Limit the execution of a PPD instruction to a single scan 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 Q Make sure only 1 PPD instruction at a time is true e Anytime its conditions are true and the equipment phase is in the pausing substate the PPD instruction acts as a breakpoint se
32. or in an example User Defined courier information that you must supply Right click You must identify the specific program in based on your application a name of program your application Typically it is a name or variable variable that you have defined enclosed in brackets a keyboard key Publication LOGIX UM001A EN P May 2005 Press Enter Press the Enter key Introduction PhaseManager Quick Start Guidelines Table of Contents Chapter 1 What is PhaseManager its 23h eee Gy DHE oh eae a te 1 1 How does PhaseManager help me 1 3 What is a State model soy ta 44g Ge aliahsn tit hdl gl Agia 1 4 How do I apply a state model to my equipment 1 5 How does my equipment change states 1 6 Can I manually change states nonna acto eon ae ath 1 7 What is ownership o a yack aaae 1 7 What if my equipment doesn t fit the state model 1 8 How does PhaseManager compare to other state models 1 9 How do I get started ssa dats dee aaa eo a 1 9 Chapter 2 Purpose of this chapter cht a eee a 2 1 When to use this chapter cea aoaaa aaa aaa 2 1 How to use this chapter ea th nee Gedo wine eG 2 1 GUC Tastes e erate aed E a PS Male Se hth E A N N 2 1 Create an Equipment Phase esctet sttunes pistes 428 92 2 2 Create a State ROUUING Gili 6 de ie 4 eek ee ge Rene 2 2 2 Manually Step Through the States 2 3 Before you begin n eek 0
33. out your project and refer back to them as needed Guideline Page Use a separate equipment phase for each activity 3 2 Fill out the state model for each equipment phase 3 4 Separate equipment phase code from equipment code 3 9 Separate normal execution from exceptions 3 12 Use a PSC instruction to signal when a state is done 3 24 Use the PCMD instruction to transition to a different state 3 18 Create equipment interface tags 3 26 Use alias tags 3 31 Publication LOGIX UM001A EN P May 2005 3 2 Guidelines Use a separate equipment phase for each activity Guideline 1 Make sure each equipment phase does an independent activity 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 Follow these guidelines as you decide how many equipment phases to use Details 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 This in probably NOT an equipment phase phase e Fill bottles with product e Accelerate filler axis too small e Put bottles in carton e Run bottling line too big e Add water to a tank e Open water valve too small e Mix ingredients in tank e Brew ingredients too big 2 Keep the numb
34. set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e The instruction executes na e The rung condition out is set to true scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction signals that the state is complete The instruction signals that the state is complete postscan The rung condition out is set to false Publication LOGIX UM001A EN P May 2005 No action taken E Step_000 Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 7 Example Relay Ladder If ThisPhase Steplndex 30 The routine is at step 30 Then the PSC instruction signals that the state is done complete After the controller scans the rest of the routine rung 5 rung 6 etc the equipment phase goes to the next state Qu Equal Source ThisPhase Steplndex lt Add_Water Steplndex gt 30 30 Source B Water Valve ProgCommand FillT ime DN Open alve Water Valve Devicel State Structured Text N Lf Action_000 agitator ProgCommand When the SFC reaches Step_002 the PSC instruction signals that the state is done complete Publication LOGIX UM001A EN P May 2005 A 8 Equi
35. tag is at the controller scope controller tag Suppose you plan to reuse an equipment phase for a different part of your tank In that case 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 ThisPhase 3 Make a copy of the equipment phase 4 Point the alias tag of the copy to its controller tag For this information See this publication guidelines and considerations for alias tags Logix5000 Controllers Design Considerations 1756 RM094 steps to assign alias tags Logix5000 Controllers Common Procedures publication 1756 PM001 Publication LOGIX UM001A EN P May 2005 3 32 Guidelines Notes Publication LOGIX UM001A EN P May 2005 Appendix A Purpose of This Appendix This section Instruction name Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET This appendix provides a description of each equipment phase instruction in this format Provides this type of information identifies the instruction Operands Instruction structure lists all the operands of the instruction lists control status bits and values if any of the instruction Description describes the instruction s use defines any differences when the instruction is enabled and disabled if appropriate Arithmetic status
36. 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 Step 1 PATT Attach to Equipment Phase Phase Name Add_Water Result PATT_Result 0 PATT Attach to Equipment Phase Phase Name Add_Inagredient Result PATT_Result 1 EQU Equal Source Ownership pe Source B 3 EQU Ownership 0 Equal Source 4 PATT_Result 0 pe Source B 0 EQU Equal Source 4 PATT_Result 0 oe Source B 24582 EQU Ownership 1 Equal Source 4 PATT_Result 1 o Source B 0 EQU Equal Source 4 PATT_Result 1 o Source B 24582 Step_Done Publication LOGIX UM001A EN P May 2005 A 46 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Structured Text At the first step in the sequence this action tries to take ownership of 2 equipment phases that the sequence uses mi IN Ef Action_oos ATT Add Water PATT Result 0 Take Ownership ATT Add Ingredient PATT Result 1 N f Action_o09 Mf iPATT_Result 0 0 or PATT_Result 0 24582 then Ownership O 1 Tf PATT Result 1l 0 or Ownership 1 1 PATT_ Result 1l 24582 then Tran_005 This action checks that the program owns the equipment phases If the Result of each P
37. to PackML 1 9 compared to S88 1 9 handle exceptions 3 12 mark as done 3 24 overview 1 4 set the initial state 2 6 set up transitions 3 18 step through 1 7 2 3 transition when done 3 24 transitions between states 1 6 3 18 use 1 5 3 4 use a state bit 3 14 stopped state use 1 5 stopping state use 1 5 T test equipment phase 2 3 transfer of control A 35 transition step through 2 3 when done 3 24 Publication LOGIX UM001A EN P May 2005 4 Index Publication LOGIX UM001A EN P May 2005 How Are We Doing PANE Your comments on our technical publications will help us serve you better in the future Thank you for taking the time to provide us feedback Ty You can complete this form and mail or fax it back to us or email us at RADocumentComments ra rockwell com Pub Title Type PhaseManager Cat No Pub No LOGIX UMO01A EN P Pub Date May 2005 PartNo 957899 90 Please complete the sections below Where applicable rank the feature 1 needs improvement 2 satisfactory and 3 outstanding Overall Usefulness 1 Zz 3 How can we make this publication more useful for you 2 3 Can we add more information to help you Completeness all necessary information procedure step illustration feature is provided a example guideline other explanation definition Technical Accuracy 1 2 3 Can we be more accurate all provided information l is correct text illustration C
38. 2005 3 6 Guidelines State Model Worksheet Equipment Phase N unin IDLE Start RUNNING Hold HOLDING HELD Command Command Done lt q Done Hold Command eae RESTARTING Restart RESETTING Command Stop Abort Command Command Reset COMPLETE STOPPING Abort ABORTING 7 B D Ko Done Done R STOPPED ABORTED eset Command Key Publication LOGIX UM001A EN P May 2005 C S Guidelines 3 7 State Model Worksheet Equipment Phase Add Water N C umn gt IDLE i Start RUNNING i Hold HOLDING HELD e No water flow ommane Te Lock equipment in ene e Stop water Done e No water flow rogram control gt gt e Tank Not full prog e Unlock equipment e Operator can Operator can e Add water it ue control equipment control equipment e Unlock equipment A contro from program control N S Done Hold Command Bong RESTARTING Restan RESETTING e Lock equipment in Command program control Stop Abort Command Command Reset COMPLETE STOPPING Abort ABORTING Command e No water flow e Stop water Command f Stop water e Water at high limit e Unlock equipment e Unlock equipment e Operator can from program from program i control control control equipment w Reset STOPPED ABORTED Command e No water flow e No wate
39. 4dd_Ingredient CRP Agitate 8 Drain_Tank ir My_Devices_200ms O vessel_V1 Program Tags Ff Valves_n_Agitate N Action_000 ater_Feed State_Cund oaognan Water_Feed State The equipment program follows the commands of the equipment phase and sends back its mode and state BAND_01 BAND Boolean And Water Valve _D2 D250 g Discrete 2 State Device ProgCommand fj ProgProgReq b2SD Discrete 2 State Device Pro gCom man d Out State1Perm Device0 State FB0 Device State FB1 ProgOper 4 Water_P ump_FBO D 0 Water_Pump_FB1 E E ProgPro gReq Publication LOGIX UM001A EN P May 2005 EI Controller SmartBelt E Tasks EA MainTask Se MyPhase Phase Tags Er Prestate_Routine ay Aborting ay Holding ay Resetting Fd Restarting Running amp Stopping oS My_Equpment_Program A Program Tags E Main_Routine B Check_for_Axis_Faults B Clear_Axis_Faults B Disable_axes B Enable_axes B Home_Axes B Stop_Axes Guidelines 3 11 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
40. ATT instruction 0 or 24582 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 Ownership 3 If Ownership 3 The program owns both equipment phases as shown by bits 0 and 1 then the SFC goes to the next step Publication LOGIX UM001A EN P May 2005 Detach from Equipment Phase PDET Operands DET Detach from Equipment Phase Phase Name PDET Phase Name Description Arithmetic Status Flags Fault Conditions Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 47 Use the PDET instruction to relinquish ownership of an equipment phase Relay Ladder Operand Type Format Description Phase Name phase name of the Equipment phase that you no longer want to equipment own phase Structured Text The operands are the same as those for the relay ladder PDET instruction After a program executes a PDET instruction the program no longer owns the equipment phase This frees the equipment phase for ownership by another program or by RSBizWare Batch software Use the PDET instruction only if the program previously took ownership of an equipment phase via an Attach to Equipment Phase PATT instruction not affected none Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condit
41. Allen Bradley PhaseManager 1756 ControlLogix 1769 CompactLogix 1789 SoftLogix 1794 FlexLogix 20D PowerFlex 700S with DriveLogix User Manual Rockwell Automation Important User Information 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 SGI 1 1 available from your local Rockwell Automation sales office or online at http www ab com manuals gi 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 cir
42. 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 State Ask Stopped What happens when you turn on power Resetting How does the equipment get ready to run Idle How do you tell that the equipment is ready to run Running What does the equipment do to make product Holding How does the equipment temporarily stop making product without making scrap Held How do you tell if the equipment is safely holding Restarting How does the equipment resume production after holding Complete How do you tell when the equipment is done with what it had to do Stopping What happens during an normal shutdown Aborting How does the equipment shutdown if a fault or failure happens Aborted How do you tell if the equipment is safely shutdown Publication LOGIX UM001A EN P May 2005 1 6 Introduction How does my equipment The arrows in the state model show to which states your equipment change states transition Command Resetting Start Complete Type of transition can go from the state it is in now e Each arrow is called a transition e 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
43. CLF PXRO PRNP PPD PATT PDET Example Relay Ladder In the prestate routine of an equipment phase If Drain_Valve FaultAlarm 1 The valve did not go to the commanded state then Failure code for the equipment phase 102 Drain_Valve Fault amp larm 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 Drain_Tank Running EQU Equal Source Drain_Tank Failure 102 Source B Structured Text PCMD Equipment Phase Command Phase Name Drain_Tank Command hold Result 0 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 PFL 102 End If If the Drain Tank equipment If Drai n Valve FaultAlarm Then t phase running and its failure code 102 issue the hold command and send the equipment phase to 102 Then PCMD Drain _Tank hold 0 End IF Publication LOGIX UM001A EN P May 2005 the holding state If Drain _Tank Running And Drain Tank Failure Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 21 Equipment Phase Clear Use the PCLF instruction to clear the failure code of an e
44. IX UM001A EN P May 2005 Use a PSC instruction to signal when a state is done 3 24 Example 1 Add water to a tank 0 06666 cee ews 3 25 Example 2 Smart belt 4 04 oekaki lew Laan he Bad 3 25 Create equipment interface 1406 6 5 65 So ad oe PETES 2S 3 26 Example 1 Add water toa tank 3 28 Example 2 Smart belt nannaa ack ee tom ndhogcee Rots 3 29 Example 2 Smart belt Continued hy 2 ky He 8 OXY O49 3 30 LISS ANAS TAOSs uc yz amp candein ania ee pial Roden We EE BRR eR 3 31 ERA DIC a4 ote ae bbe hawt ae ke a Bg SG Lb dad oe hea 3 31 Appendix A Purpose of This Appendix naaa a es ee ER RS A 1 Conventions and Related Terms o on anaana aaa A 2 Setand Clearer ve ak ars eap ea nE E ee ye tee ahead A 2 Relay Ladder Rung Condition A 2 Pr scan of ROUDES syria 4 anh y OX ee EK Ge ee oS A 3 Choose an Equipment Phase Instruction A 4 Phase State Complete PSC cca Ste hb Gh Bale Gk Ha yt A 5 Equipment Phase Command PCMD A 8 Equipment Phase Override Command POVR A 13 Equipment Phase Failure PFL 1 2 5 eho Oo mae teow es A 17 Equipment Phase Clear Failure PCLF A 21 Equipment Phase External Request PXRQ A 23 Equipment Phase New Parameters PRNP A 34 Equipment Phase Paused PPD 9 is sc Sa dike Kags A 37 Attach to Equipment Phase PATT A 42 Detach from Equipme
45. Phase New lnputParameters lt Mix1 Nev InputParameters ThisPhase New nputParameters 0 via the PRNP instruction Move Source 2 Dest Data Yalues O XRQ Equipment Phase External Request Phase Instruction External Request Data Value RQ_Control O PC _ priv RQ_Control 0 Download Input Parameters Subset DataYalues Publication LOGIX UM001A EN P May 2005 A 36 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Structured Text This is a stored action It continues to execute even after the SFC leaves Step_001 S Action_008 Set up a stored action to check for New Input Parameters Hf ThisPhase NewInputParameters then if Mable PXRQ OR NOT RQ Control 0 PC then DataValues 0 2 PXRQ RQ Control 0 DownloadInputParametersSubset DataValues Enable PXRQ 0 Step_001 end if if RQ _Control 0 PC then PRNP Enable PXRQ end if If ThisPhase NewlnputParameters 1 RSBizWare 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 O 2 This sets the PXRQ instruction for transfer of control Send the Download Input Parameters Subset request to RSBizWare Batch software Since DataValues 0 2 the instruction is set for transfer of control Enable_PXRQ 0 Do not let the PXRQ
46. 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 UM001A EN P May 2005 3 20 Guidelines Guideline Details 5 See if you must use a POVR instruction instead of a PCMD instruction 7 Equipment Phase Monitor My Phase quipi 3 iner s RSLogix 5000 1 b Takes ownership My Code XX Can t command A Are you giving the hold stop or abort command e NO Use the PCMD instruction e YES Go to step B B Must the command work even if you have manual control of the equipment phase via RSLogix 5000 software e YES Use the POVR instruction instead See page A 13 e NO Go to step C C Must the command work even if RSBizWare Batch software or another program owns the equipment phase e YES Use the POVR instruction instead See page A 13 e NO Use the PCMD instruction Publication LOGIX UM001A EN P May 2005 Guidelines 3 21 Example 1 Tank F 3 Controller MyPhaseManager amp Tasks The controller uses an SFC to command the phases that run the tank add water Sal MainTask heat add ingredients etc Add_Water ag He
47. an Relay Ladder Interface_To_Equipment Equipment_Faultts_Cleared Fault_Strobe __ fons OVR Equipment Phase Override Command Phase Name Shear_One_Phase Command Abort Result 0 Structured Text f 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 Publication LOGIX UM001A EN P May 2005 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 17 Equipment Phase Failure Use the PFL instruction as an optional method to signal a failure for an equipment phase PFL Ai Operands 2 Relay Ladder CPFL gt Operand Type Format Description Failure_Code DINT immediate value to which you want to set the failure tag code for the equipment phase PFL Failure Code Structured Text The operands are the same as those for the relay ladder PFL instruction Description The PFL instruction sets the value of the failure code for an equipment phase Use the instruction to signal a specific failure for an equipment phase such as a specific device has faulted Controller Tags MyPhaseManage 10 x Scope f MyPhaseManage gt PHASE Drain_Valve FaultAlarm 102 Name Value Data Type F Drain_Tank PHASE amp Drain_Tank State 64 DINT E Drain_T ank Running 0
48. andby state Standby BOOL Logix5000 equipment phases don t have a standby state To create a standby state use the Standby bit Publication LOGIX UM001A EN P May 2005 B 6 PHASE Data Type Notes Publication LOGIX UM001A EN P May 2005 Appendix C Configure an Equipment Phase Purpose This appendix steps you through the configuration settings for an equipment phase When Use this appendix when you want to change the default settings of an equipment phase Open the Configuration for an Equipment Phase 9 Controller MyController Tasks 3 48 MainTask amp MainProgram 1 i EI unscheduled rams Phases L fy Finalize All Edits in Phase Ctrl Shift F o oooO E Equipment Phase Properties My_Phase mlx eneral Configuration Parameters Monitor Assigned Routines Prestate k none gt A Fault knone gt Inhibit Equipment Phase Initial State Idle F J Complete State Immediately If not Implemented Initial Step Index 0 External Sequencer Loss of cnone gt Communication Command External Request Hold Action lt none gt z Publication LOGIX UM001A EN P May 2005 C 2 Configure an Equipment Phase Configure an Equipment Phase Setting 1 Prestate 2 Fault Use the following settings to configure an equipment phase Choices current state routine prestate routine The prestate rou
49. another phase Phase DINTI aiei DINT 2 value 2 cancel a message to another phase Cancel Message to Linked Phase DINT O message ID cancel all messages to another Cancel Message to Linked Phase DINT O 0 phase download customer s batch ID Download Batch Data DINT O 1 DINT 1 parameter ID in which to store the value download unique batch ID Download Batch Data DINTO 2 DINT 1 parameter ID in which to store the value Publication LOGIX UM001A EN P May 2005 A 28 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET If you want to Then configure the PXRQ instruction as follows External Request Data Value Value Array Element download phase ID Download Batch Data DINT O 3 DINT 1 parameter ID in which to store the value download recipe control verses Download Batch Data DINT O 4 manual phase control DINT 1 parameter ID in which to store the value In the result value 0 recipe control 1 manual phase control download current mode of the Download Batch Data DINT O 5 phase DINT 1 parameter ID in which to store the value In the result value 0 P Auto mode 1 0 Auto mode download the low limit of an input Download Batch Data DINT O 6 parameter The input parameter tag stores the low limit download the high limit of an input Download Batch Data DINT O 7 parameter The input parameter tag stores the high limit download da
50. at ie Add_Ingredient ae Agitate 3 Drain_Tank 3 MainProgram A Program Tags ER MainRoutine 3 Tank1_Procedure B Tank2_Procedure iF My_Devices_200ms Give the start command to the Add_ Water equipment phase The P1 qualifier limits this to the first scan of the step F P1 E Action_000 PCMD Add Water Start 0 PO Action_004 CMD Add Water Reset 0 Dy Tran_oo1 i 7 Add Water Complete Wait until the Add_Water equipment phase A is done complete When the equipment L phase is done give the reset command The ei Pa lial Action_008 PO qualifier limits this to the last scan of the PCMD Heat Start 0 Heat_Step g PO Action_009 PCMD Heat Reset 0 step N Start the next equipment phase Publication LOGIX UM001A EN P May 2005 3 22 Guidelines E Controller SmartBelt E Tasks 3 8 MainTask MyPhase Phase Tags Er Prestate_Routine EZ Aborting ay Holding ey Resetting ae Restarting Running ay Stopping oS My_Equpment_Program A Program Tags E Main_Routine B Check_for_Axis_Faults B Clear_Axis_Faults B Disable_Axes B Enable_Axes B Home_Axes B Stop_Axes Ue Publication LOGIX UM001A EN P May 2005 Example 2 Smart belt If the operator presses the start button on the machine or HMI then My_Inputs AnyStar
51. at is similar to S88 and PackML models PhaseManager User Manual publication LOGIX UM001 program a specific Logix5000 programming instruction e Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 e Logix5000 Controllers Process and Drives Instructions Reference Manual publication 1756 RM006 e Logix5000 Controllers Motion Instructions Reference Manual publication 1756 RM007 import or export a Logix5000 project or tags from or to a text file Logix5000 Controllers Import Export Reference Manual publication 1756 RM084 convert a PLC 5 or SLC 500 application to a Logix5000 project Logix5550 Controller Converting PLC 5 or SLC 500 Logic to Logix5550 Logic Reference Manual publication 1756 6 8 5 use a specific Logix5000 controller e Compactlogix Controllers User Manual publication 769 UM007 ControlLogix System User Manual publication 1756 UM001 DriveLogix System 5720 User Manual publication 20D UM002 DrivelLogix5730 Controller for PowerFlex 700S Drives with Phase I Control User Manual publication 20D UM003 FlexLogix Controllers User Manual publication 794 UM001 SoftLogix5800 System User Manual publication 1789 UM002 control devices over an EtherNet IP network EtherNet IP Modules in Logix5000 Control Systems User Manual publication ENET UM001 control devices over an ControlNet network ControlNet Modules in Logix5000 Control Systems User Manual
52. ater Command Reset Result 0 Equal Source ProcedureB_Steplndex 20 Source B 20 Move Source 30 Dest ProcedureB_Steplndex 206 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 PO Action_004 p PCMD Add Water Start 0 Add_Water 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 PO qualifier limits this to the last scan of the step Tran_001 Add Water Phase Complete Publication LOGIX UM001A EN P May 2005 A 12 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Example 2 Relay Ladder 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_I ngredient equipment phase to running via the start command Verify that the command was successful and store the result code in PCVD_Result 1 DINT tag EQU MyONS_1 CMD Equipment Phase Command Phase Name Add_Ingredient Command Start Result PCMD_Result 1 Equal Source A ProcedureB_Steplndex 306 30 Source B Structured Text P41 Acton 001 PCMD Add Ingredient Start PCMD Result 2Z
53. ay 2005 1 4 Introduction What is a state model Start Hold 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 etc You don t need to use all the states for your equipment Use only the states that you want There are 2 types of states Type of state Description Acting Does something or several things for a certain time or until certain conditions are met An acting state runs one time or repeatedly Waiting Shows that certain conditions are met and the equipment is waiting for the signal to go to the next state PhaseManager uses the following states Your equipment can go from any Reset Reset state in the box to the stopping or Holding Held aborting state Hold Restart Acting Stop Abort Acting states represent the Abort things your equipment does at Stopping Aborting a given time Waiting Stopped Aborted Waiting states represent the Publication LOGIX UM001A EN P May 2005 condition of your equipment when it is in between acting states How do I apply a state model to my equipment Introduction 1 5 The use of a state model may sound like a big change for programmers
54. cuits equipment or software described in this manual Throughout this manual when necessary we use notes to make you aware of safety considerations 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 IMPORTANT Identifies information that is critical for successful application and understanding of the product ATTENTION Identifies information about practices or circumstances that can lead to personal injury or death property damage or economic loss Attentions help you e identify a hazard e avoid a hazard e recognize the consequence TAATAAN Labels may be located on or inside the equipment e g drive or motor to alert people that dangerous voltage may be present BURN HAZARD Labels may be located on or inside the equipment e g drive or motor to alert people that surfaces may be dangerous temperatures When to Use This Manual You are here c gt To get started with a Logix5000 controller Preface The manual is one of various Logix5000 manuals See Logix5000 Controllers Quick Start publication 1756 QS001 program a Logix5000 controller detailed and comprehensive information Logix5000 Controllers Common Procedures publication 1756 PM001 e use equipment phases e setup a state model for your equipment e program in a way th
55. dding ingredient Step_001 DN The SFC goes to Step_004 N af Action_003 PPD 3 When the SFC goes to Step_004 The PPD instruction sets Add_ ngredient Paused 1 While Add_ ngredient Paused 1 the SFC stays at Step_004 When the equipment phase gets the resume command Add_Ingredient Paused 0 The SFC goes to the next step Not Add Ingredient Paused Publication LOGIX UM001A EN P May 2005 A 42 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Attach to Equipment Phase Use the PATT instruction to take ownership of an equipment phase to PATT either e prevent another program or RSBizWare Batch software from commanding an equipment phase e make sure another program or RSBizWare Batch software does not already own an equipment phase Operands PATT Relay Ladder Attach to Equipment Phase ap Name 5 Operand Type Format Description Phase Name phase name ofthe Equipment phase that you want to own equipment phase Result DINT immediate To let the instruction return a code for its tag success failure enter a DINT tag in which to store the result code Otherwise enter 0 PATT Phase Name Structured Text Result 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 e Ownership is optional As long as an equipment phase has no owners any sequencer program
56. e current state routine ae Use the prestate routine for conditions that you want to watch all the time such as fault bits The prestate routine e runs all the time e runs before each scan of a state e runs even in the waiting states idle held complete stopped or aborted Publication LOGIX UM001A EN P May 2005 Guidelines 3 13 Guideline Details 2 Create a prestate routine just like H E Controller MyController the routine for a program It s not ES Tasks a phase state routine 8 MainTask H C3 MainProgram 1 asg i E Unscheduled rams Phases 4 New Parameter New Routine My_Prestate_Fouine Type Ladder Diagram X 3 Select any language a nProgram f or Phase 3 Add watss l Open Routine 4 Publication LOGIX UM001A EN P May 2005 3 14 Guidelines Guideline Details 3 Assign a prestate routine E Controller MyController Ue E Tasks 3 88 MainTask E 3 MainProgram He 1 E unscheduled rams Phases I Finalize All Edits in Phase Ctrl Shift F Properties N io x E Equipment Phase Properties Add_Ing ed ie 2 Bereta Configuration Parameters Monitor Assigned Routines Prestate E My_Prestate_Routine Fault T Inhibit Equipment Phase Initial State Idle fii IV Complete State Immediately If not Implemented Init
57. e if the equipment phase is in the holding Holding BOOL Read only state see if the equipment phase is in the restarting Restarting BOOL Read only state see if the equipment phase is in the stopping Stopping BOOL Read only state see if the equipment phase is in the aborting Aborting BOOL Read only state see if the equipment phase is in the resetting Resetting BOOL Read only state see if the equipment phase is in the idle state Idle BOOL Read only see if the equipment phase is in the held state Held BOOL Read only Publication LOGIX UM001A EN P May 2005 PHASE Data Type B 3 If you want to Then check this Datatype Notes member see if the equipment phase is inthe complete Complete BOOL Read only state see if the equipment phase is in the stopped Stopped BOOL Read only state see if the equipment phase is inthe aborted Aborted BOOL Read only state use one member to monitor the substate of an Substate DINT Read only gauipmem piast For this substate Use this bit Pausing 0 Paused 1 AutoPause 2 see if the equipment phase is in the pausing Pausing BOOL Read only substate see if the equipment phase is in the paused Paused BOOL Read only substate see if the equipment phase is in the AutoPause BOOL Read only auto pause substate use an integer value or the bits of anintegerto Steplndex DINT e To initialize the Steplndex value use sequence through a series of steps the configu
58. e new parameters instruction A 34 equipment phase override command instruction A 13 Publication LOGIX UM001A EN P May 2005 equipment phase paused instruction A 37 equipment program interface tag 3 26 lay out the code 3 9 set up the data 3 26 use 3 9 example A 35 clear a failure code A 22 equipment phases for a machine 3 3 equpment phases for a tank 3 3 get aresult code A 12 give acommand A 11 handle a fault A 20 handle a jam 3 23 A 16 handle fault of a device 3 16 handle timeout 3 17 interface tag for a machine 3 29 interface tags for a tank 3 28 let go of ownership A 48 machine is done resetting 3 25 override an owner A 16 procedure for a tank 3 21 separate code for a machine 3 11 separate code for a tank 3 10 sequence equipment phases 3 21 set up breakpoints A 41 signal a state as done A 7 start a machine 3 22 state model for a machine 3 8 state model for a tank 3 7 take ownership of several phases A 45 tank is done adding water 3 25 use a failure code A 20 use PXRQ instruction to acquire resources A 33 exception handle 3 12 external request hold action C 3 respond to lost communication C 3 F failure code clear A 21 set A 17 fault example 3 16 3 17 3 23 handle 3 12 set a failure code 3 15 Publication LOGIX UM001A EN P May 2005 H held state use 1 5 holding state use 1 5 3 12 l idle state use 1 5 inhibit equipment phase C 2 initial state
59. e states Continued on next page Publication LOGIX UM001A EN P May 2005 2 4 PhaseManager Quick Start Step Notes fX Equipment Phase Monitor My_Phase E Owner s RSLogis 5000 1 tart Equipment Phases My Phase Resetting e The equipment phase goes to the Running state e Any code in the Running state routine starts running This is where you put the code for the normal production sequence of your equipment 3 Click Start 15 x fX Equipment Phase Monitor My_Phase rag Owner s RSLogix 5000 1 r Start Hold 4 Hold Equipment Phases Ziy Phase e The equipment phase goes to the Stopped state e The Running state routine stops running e The Stopping state routine is optional Without it the equipment phase goes directly to the Stopped state 4 Click Stop Continued on next page Publication LOGIX UM001A EN P May 2005 PhaseManager Quick Start 2 5 Step Notes fY Equipment Phase Monitor My_Phase joj x Equipment Phases E Owner s RSLoaix 50001 Auto Pause Pause Fast Aborted Resume 5 Click Reset e The equipment phase goes to the Idle state e The Resetting state routine is optional Without it the equipment phase goes directly to the Idle state PY Equipment Phase Monitor My_Phase jol x 6 Click the ownership button This releases the
60. er of equipment If you have this controller You can have up to ari nie Sveti th ControlLogix 100 programs and equipment phases per task SoftLogix 100 programs and equipment phases per task FlexLogix 32 programs and equipment phases per task CompactLogix 32 programs and equipment phases per task 3 List the equipment that goes Example ao pach equipment This equipment phase Relates this equipment Add_Water water pump water valve limit switch Smart_Belt Coarse belt axis Fine belt axis Exit belt axis Publication LOGIX UM001A EN P May 2005 Guidelines 3 3 Example 1 Tank The following example shows the equipment phases for a tank that cooks ingredients To cook the ingredients the Which become these phases Which commands this equipment tank E Controller My_Tank 1 Adds water o Tasks BA MainTask 2 Heats the a ki 82 Add_Water 3 Adds other ingredients Yg H E Heat e H E Add_Ingredient 4 Mixes all the ingredients p EE Agtate o gt H Drain_Tank 5 Dispenses the finished product 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 Since it does only one activity it needs only 1 equipment phase H E Controller SmartBelt pom SSos sa Tasks i ooo H A MainTask C ace Part MP Series Brushless
61. er of values Publication LOGIX UM001A EN P May 2005 If you want to Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 27 Then configure the PXRQ instruction as follows External Request Data Value Value Array Element upload the output parameters Upload Output Parameters Subset DINTO terminal 1 configured for automatic upload on transfer of control 2 terminal state or transfer of control send a message to an operator Send Message to Operator DINT O message ID clear a message from an operator Clear Message to Operator DINT O 0 acquire a resource Acquire Resources DINT O equipment ID acquire multiple resources Acquire Resources DINT O equipment ID DINT 1 equipment ID release a single resource Release Resources DINT O equipment ID release multiple resources Release Resources DINT O equipment ID DINT 1 equipment ID release all resources Release Resources DINTO 0 send a message and optional data Send Message to Linked Phase DINT O message ID to another phase DINT 1 number of receivers DINT 2 value 1 DINT 3 value 2 send a message and optional data Send Message to Linked Phase and DINT O message ID to another phase and wait forthe Wait DINTI namber ai recever phase to receive the message DINT 2 value 1 DINT 3 value 2 wait to receive a message from Receive Message From Linked DINT O message ID
62. es Add_Water F iol xj General Configuration Parameters Monitor Assigned Routines Prestate Ic none gt X Fault k none bd I Inhibit Equipment Phase IntialState fde e When the equipment phase neat Idle goes from idle running IV Complete State Immediately If not Implemented Steplndex Initial Step Index ys Initial Step Index 1 e To advance to the next step write logic to increment the Steplndex value e g MOV MUL OTL Publication LOGIX UM001A EN P May 2005 B 2 PHASE Data Type Member Control Method Failure To Use this instruction set the Failure value Equipment Phase Failure PFL clear the Failure value Equipment Phase Clear Failure PCLF NewlnputParameters To clear the NewlnputParameters bit use an Equipment Phase New Parameters PRNP instruction Producing Use bit level instructions or an assignment to set or clear this bit e g OTE Standby Use bit level instructions or an assignment to set or clear this bit e g OTE PHASE Data Type If you want to Then check this Datatype Notes member use one member to monitor the state of an State DINT Read only eguigment phask For this state Use this bit Running 0 Holding 1 Restarting 2 Stopping 3 Aborting 4 Resetting 5 Idle 6 Held 7 Complete 8 Stopped 9 Aborted 10 see if the equipment phase is in the running Running BOOL Read only state se
63. estions such as Question How can get the highest performance possible from my equipment Answer 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 across your plant you have consistent data from equipment to equipment How can 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 make it easier to maintain the code How can give my operators a clean intuitive HMI 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 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 UM001A EN P M
64. et the ABORT bit 1 When the controller aborts the instruction e ER 1 e ERR shows the result of the abort Publication LOGIX UM001A EN P May 2005 A 24 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET If you want to Thencheck Datatype Notes or set this member e diagnose the cause of an error ERR INT If ER 1 the error code gives diagnostic information To e write logic to respond to specific errors interpret the error code see PXRQ Error Codes on page A 31 EXERR INT If ER 1 the extended error code gives additional diagnostic information for some errors To interpret the extended error code see PXRO Error Codes on page A 31 use one member for the various status bits of Status DINT For this member Use this bit the tag Publication LOGIX UM001A EN P May 2005 EN 31 ER 28 PC 27 IP 26 WA 25 ABORT 24 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 25 Figure A 2 Timing Diagram of a PXRQ Instruction wo Description O The rung condition in goes true The instruction sends the request to RSBizWare Batch software 2 OO Description The rung condition in goes true The instruction sends the request to RSBizWare Batch software RSBizWare Batch software starts processing the request RSBizWare Batch software starts processing the request QB
65. flags defines whether or not the instruction affects arithmetic status flags Fault conditions Execution defines whether or not the instruction generates minor or major faults if so defines the fault type and code defines the specifics of how the instruction operates Example provides at least one programming example in each available programming language includes a description explaining each example The following icons help identify language specific information This icon Indicates this programming language relay ladder structured text Publication LOGIX UM001A EN P May 2005 A 2 Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Conventions and Related Terms Publication LOGIX UM001A EN P May 2005 Set and Clear This manual uses set and clear to define the status of bits booleans and values non booleans This term Means set the bit is set to 1 ON a value is set to any non zero number clear the 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 Relay Ladder Rung Condition The controller evaluates ladder instructions based on the rung condition preceding the instructi
66. g Aborting done done Reset Stopped Aborted Type of transition Description Instruction Command A command tells the equipment to start doing something or do something PCMD different For example the operator pushes the start button to start production and the stop button to shutdown Use an Equipment Phase Command PCMD instruction PhaseManager uses these commands to give a command Or use RSLogix 5000 software reset stop restart start hold abort Done Equipment goes to a waiting state when it s done with what it s doing You PSC 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 Publication LOGIX UM001A EN P May 2005 Use the Phase State Complete PSC instruction to signal when a state is done See page A 5 for more information Guidelines 3 25 F F E Controller MyPhaseManager Tasks tal MainTask J E Add_Water Phase Tags gt Prestate Eg Holding Bz Resetting Eig Restarting a Running i Heat Ry 4dd_Ingredient CRP Agitate 8 Drain_Tank ir My_Devices_200ms O vessel_v1 Program Tags Ft Valves_n_Agitate E Controller SmartBelt 3 8 Tasks ta MainTask 48 MyPhase Phase Tags EP Prestate_Routin ay Aborting ay Holding Be Resetting
67. 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 Auto Pause Pause Pausing Resume 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 Publication LOGIX UM001A EN P May 2005 Guideline Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 9 Guidelines for Using the PCMD Instruction Details Q Limit execution of a PCMD instruction to a single scan 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 use methods such as e Execute the PCMD instruction within a P1 Pulse Rising Edge or PO Pulse Falling Edge action e Place a one shot instruction before the PCMD instruction e Execute the PCMD instruction and then advance to the next step Q Determine if you need to take ownership of the equipment phase As an option a program can own an equipment phase This prevents another program or RSBizWare Batch software from
68. gt equipment program p gt group of devices does it when e jog at this speed e jog axis e produce product e go to the 1 state run pump e run pump e stop producing product a_ axis is jogging e open valve e add water to a tank e valve is faulted e calculate control variable e wait for the operator to do something Guideline Details 1 List the values that your equipment Think of these values as a faceplate to the equipment program It is the values that your phase must give to the equipment equipment phase uses to control and monitor the equipment program Do not include 1 0 program or get back from it data Inputs to the equipment program Outputs from the equipment program Publication LOGIX UM001A EN P May 2005 mode requests set points commands such as on off start stop reset permissives overrides e mode status e control values e done or completion e alarms e faults e health indication e totals or accumulated values Guideline 2 Create a user defined data type Guidelines 3 27 Details A user defined data type lets you make a template for your data It lets you group related 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 e Include a range of data that makes the data type more versatile
69. he instruction e resets to 0 all non retentive assignments e does not update input values e does not write output values The following conditions generate prescan e Toggle from Program to Run mode e Automatically enter Run mode from a power up condition Prescan does not occur for a program or equipment phase when e The program or equipment phase becomes scheduled while the controller is running e The program or equipment phase is unscheduled when the controller enters Run mode Publication LOGIX UM001A EN P May 2005 A 4 Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Choose an Equipment Phase Instruction If you want to Use this instruction Available in these languages See page signal an equipment phase that the state Phase State Complete PSC relay ladder A 5 routine is complete so go to the next state structured text change the state or substate of an equipment Equipment Phase Command PCMD relay ladder A 8 phase structured text give a hold stop or abort command to an Equipment Phase Override Command relay ladder A 13 equipment phase regardless of ownership POVR structured text signal a failure for an equipment phase Equipment Phase Failure PFL relay ladder A 17 structured text clear the failure code of an equipment phase Equipment Phase Clear Failure PCLF relay ladder A 21 structured text initiate communication with RSBizWare Ba
70. he rung condition out is set to true na na scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction commands the equipment phase to the specified state The instruction commands the equipment phase to the specified state postscan The rung condition out is set to false Publication LOGIX UM001A EN P May 2005 No action taken Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 11 Example 1 Relay Ladder 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 EQU MyONS_O PCMD Equipment Phase Command Phase Name Add_ Water Command Start Result 0 Equal Source ProcedureB_Steplndex 206 20 Source B 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 EQU dd_water Phase Complete PCMD Equipment Phase Command Phase Name Add_ W
71. ial Step Index 0 External Sequencer Loss of lt none gt Communication Command External Request Hold Action lt none gt hd e a a Cancel apiy Help y 4 Use a state bit to limit code toa RSLogix 5000 software automatically makes a tag for each equipment phase The tag has bits specific state that tell you the state of the equipment phase e The tag is at the controller scope e The tag uses the PHASE data type e 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 Publication LOGIX UM001A EN P May 2005 Guidelines 3 15 Guideline Details 5 Use the PFL instruction to signal a The Equipment Phase Failure PFL instruction sets a failure code for an equipment phase Use fault the code to signal a specific failure such as the fault of a specific device e The PFL instruction writes a code to the failure member for the equipment phase e To see the failure code of an equipment phase look at the phase name Failure tag e The failure code stays until any of the following happens e A PFL instruction sets the failure code to a larger number e The equipment phase transitions from the resetting state idle
72. icts or other DINT tag in which to store a code for the result of possible errors the execution of the instruction do not anticipate ownership conflicts or 0 other errors To interpret the result code see PCMD Result Codes on page A 10 Publication LOGIX UM001A EN P May 2005 A 10 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET 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 Code Dec Description 0 The command was successful 24577 The command is not valid 24578 The command is not valid for the current state of the equipment phase For example if the equipment phase is in the running state then a start command is not valid 24579 You cannot command the equipment phase One of the following already owns the equipment phase e RSLogix 5000 software e external sequencer RSBizWare Batch software e another program in the controller 24594 The equipment phase is unscheduled inhibited or in a task that is inhibited Arithmetic Status Flags not affected Fault Conditions none Condition prescan Execution Relay Ladder Action The rung condition out is set to false Structured Text Action No action taken rung condition in is false rung condition in is true The rung condition out is set to false e The instruction executes e T
73. in the controller RSBizWare Batch software can command an equipment phase e RSBizWare Batch software always takes ownership of an equipment phase e Once a sequencer owns an equipment phase no other sequencer can command the equipment phase Publication LOGIX UM001A EN P May 2005 Guideline Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 43 Guidelines for Using the PATT Instruction Details Q Consider ownership if you have multiple sequencers that use a common equipment phase Q Remember that RSLogix 5000 software overrides the controller Q Use the Result operand to validate ownership Ownership makes sure that a program can command all the equipment phases it needs and locks out any other sequencers If you use Then RSBizWare Batch software to also run Before you execute your sequence sequences within this controller process take ownership of all the equipment phases that the sequence multiple programs to command the same uses equipment phase none of the above There is no need to own the equipment phases Regardless of whether a program or RSBizWare 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 This Overrides this RSLogix 5000 software controller internal sequencer RSBizWare Batch software external sequencer
74. instruction e 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 0 The command was successful 24577 The command is not valid For example if the equipment phase is in the stopping state then a hold command is not valid 24594 The equipment phase is unscheduled inhibited or in a task that is inhibited Arithmetic Status Flags not affected Fault Conditions none Publication LOGIX UM001A EN P May 2005 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 15 Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e The instruction executes na e The rung condition out is set to true scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction commands the equipment phase to the specified state The instruction commands the equipment phase to the specified state postscan The rung condition out is set to false N
75. instruction restart after the request completes If RQ_Control 0 PC 1 The request is complete then ThisPhase NewlnputParameters 0 via the PRNP instruction Otherwise Enable _PXRQ 1 Let the PXRQ instruction execute the next time new input parameters are available Publication LOGIX UM001A EN P May 2005 Equipment Phase Paused PPD PPD PPD yey Operands Description Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 37 Use the PPD instruction to set up breakpoints within the logic of an equipment phase Relay Ladder none Structured Text none You must enter the parentheses after the instruction mnemonic even though there are no operands The PPD instruction lets you stop execution at a specific step breakpoint to test and troubleshoot your logic When an equipment phase is in the pausing substate and the controller executes a PPD instruction the controller e Sets the Paused bit of the PHASE tag 1 e Makes the rest of the rung false RLL Once you place PPD instructions in your equipment phase you can either use them or ignore them Start old Complete Abort Aborting Abort Stopping Pause Stopped Aborted The auto pause and pausing substates let you control whether or not the equipment phase uses your breakpoints The auto pause pause and resume commands let you change the substate a
76. ion in is false The rung condition out is set to false na rung condition in is true e The instruction executes na e The rung condition out is set to true scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction relinquishes ownership of the The instruction relinquishes ownership of the specified equipment phase specified equipment phase postscan The rung condition out is set to false No action taken Publication LOGIX UM001A EN P May 2005 A 48 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Example Relay Ladder If Step 6 1 step 6 in the sequence then Each PDET instruction relinquishes ownership of the equipment phases that the sequence owned Each Ownership bit 0 In the Ownership tag each equipment phase is assigned a bit Done 1 This signals the sequence to go to the next step PDET Detach from Equipment Phase Phase Name Add_ Water Step 6 Ownership 0 Ownership 1 Detach from Equipment Phase Phase Name Add_Inagredient Ownership 2 Detach from Equipment Phase Phase Name Agitate Ownership 3 Detach from Equipment Phase Phase Name Drain_Tank Step_Done Structured Text When the sequence is done this action e relin
77. ire Resources request to RSBizWare Batch software The DataValues tag is a DINT array that contains the equipment IDs of the resources If RO_Controlf0 PC 1 The request is complete then Go to the next step Publication LOGIX UM001A EN P May 2005 A 34 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Equipment Phase New Use the a instruction to clear the NewInputParameters bit of an j t Parameters PRNP SEP ae Operands Relay Ladder PRN none PRNP Structured Text none You must enter the parentheses after the instruction mnemonic even though there are no operands Description The PRNP instruction clears the NewInputParameters bit of the equipment phase Controller Tags MyPhaseManager controller J IE Scope J MyPhaseManage gt PHASE Add WaterCeaMeegeTaOneaior ofBooL Add Water GenerateESionatwe ofeooL Add Water DowrioadBatchoaa BOL add Water DownlosdMatersrackDataContaine BOOL add Water DovnlosdCantineBindingPioriy o BOOL add Water DovnloadSulfcierMateil o jada Water DownloadMaterialTrackDatabaseData add Water UploadMaterialTrackDataContainerin add Water UploadContainerBindinaPriory Ae Water i add Water Abort ise i When RSBizWare Batch software has new parameters for an equipment phase it sets the NewlnputParameters bit for the phase 1 a Monitor Tags After you download the parameters use the
78. larity 1 2 3 How can we make things clearer all provided information is easy to understand Other Comments You can add additional comments on the back of this form Your Name Your Title Function Would you like us to contact you regarding your comments Location Phone ___No there is no need to contact me Yes please call me Yes please email me at Yes please contact me via Return this form to Rockwell Automation Technical Communications 1 Allen Bradley Dr Mayfield Hts OH 44124 9705 Fax 440 646 3525 Email RADocumentComments ra rockwell com Publication ClG C0521C EN P May 2003 PN957899 90957782 91 Other Comments PLEASE FASTEN HERE DO NOT STAPLE PLEASE FOLD HERE BUSINESS REPLY MAIL FIRST CLASS MAIL PERMIT NO 18235 CLEVELAND OH POSTAGE WILL BE PAID BY THE ADDRESSEE Allen Bradley BELIANCE JB ELECTRIC ie DOGE Rockwell Automation 1 ALLEN BRADLEY DR MAYFIELD HEIGHTS OH 44124 9705 NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES PLEASE REMOVE Rockwell Automation Rockwell Automation provides technical information on the web to assist you in using its products At http support rockwellautomation com you can find Support technical manuals a knowledge base of FAQs technical and application notes sample code and links to software service packs and a MySupport feature that you can customize to make the best use of these tools For
79. lts_ Cleared 0 then there is a fault e Both nterface_To_Equipment and Local_I nterface are aliases for Shear_7 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 OVR Equipment Phase Override Command Phase Name Shear_One_Phase Command Abort Resutt 0 i _ _ _____ons Publication LOGIX UM001A EN P May 2005 3 24 Guidelines Use a PSC instruction to signal when a state is done IMPORTANT signal when a state is done 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 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 PCMD instruction PSC instruction Start Hold done done done AA done Hold Restart Stop Abort Reset Abort Stoppin
80. m 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 BOR_01 BOR m o Out p gt a Water_Feed He alth Boolean Or ater_V alve_FBO_F ault ater alve_FB1_F ault Publication LOGIX UM001A EN P May 2005 E Controller SmartBelt E Tasks 3 8 MainTask MyPhase Phase Tags Er Prestate_Routine EZ Aborting ay Holding ay Resetting ae Restarting Running ay Stopping oS My_Equpment_Program A Program Tags E Main_Routine B Check_for_Axis_Faults B Clear_Axis_Faults B Disable_Axes B Enable_Axes B Home_Axes B Stop_Axes Eres Guidelines Example 2 Smart belt 3 17 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 E Tran_oo1 My_Equipment EnableDone 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 Step_000 DN SR One Shot Rising Storage Bit Clear_Faults_Timeout_ONS Output Bit Clear_Faults_Timeout MyPhase Resetting Clear_Faults_Timeout P
81. me the equipment phase changes states The controller resets the Steplndex to the number you put in the Initial Step Index box Configure an Equipment Phase C 3 Setting Choices 7 External Sequencer Loss of A Are you using RSBizWare Batch software to command this equipment phase Communication Command e NO Skip this box e YES Go to step B B If the controller loses communication with RSBizWare Batch software what do you want the equipment phase to do e Continue in its current state Select lt none gt e Go to aborting Select Abort e Go to holding Select Hold e Go to stopping Select Stop The equipment phase must still follow the state model For example it goes to holding only if it is in running or restarting when communication fails 8 External Request Hold Action A Are you using any PXRQ instructions e NO Skip this box e YES Go to step B B What do you want to do if an equipment phase goes to holding while a PXRQ instruction is in process e Nothing Select lt none gt e Stop the request Select Clear Publication LOGIX UM001A EN P May 2005 C 4 Configure an Equipment Phase Notes Publication LOGIX UM001A EN P May 2005 A aborted state use 1 5 aborting state use 1 5 3 12 add equipment phase 2 2 phase state routine 2 2 attach to equipment phase instruction A 42 breakpoint See PPD instruction c clear PHASE tag values B 1 command example
82. nd step through your breakpoints Publication LOGIX UM001A EN P May 2005 A 38 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET The following timing diagram shows how the PPD instruction effects the substate bits of a PHASE tag l l l l phase_name AutoPause l l phase_name Pausing phase_name Paused phase_name Running l rung condition in rung condition out Description The equipment phase gets the auto pause command The equipment phase gets the start command Once the equipment phase starts it goes to the pausing substate Input conditions for the PPD instruction go true The equipment phase changes from the pausing substate to the paused substate The equipment phase gets the resume command oroe The logic goes to next step so input conditions go false and the outputs no longer execute Because auto pause is on the equipment phase automatically goes back to the pausing substate Publication LOGIX UM001A EN P May 2005 Guideline Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 39 Guidelines for Using Breakpoints Details Q Organize your logic as a series of steps PPD instructions breakpoints are easiest to use if your logic moves through defined steps such as a state machine or SFC e A breakpoint only signals that specific conditions are
83. ner Binding DINT O parameter ID in which to store the value container priority Priority upload a new container priority for Upload Container Binding Priority DINT 0 parameter ID that has the value the current binding download information regarding Download Sufficient Material DINT O parameter ID in which to store the value the availability of sufficient In the result value material 0 insufficient material 1 sufficient material generate a signature Generate E Signature DINT O ID of the signature template DINT 1 define if the signature is cancelable no 0 yes nonzero download material attribute Download Material Track Database DINT O 0 Data DINT 1 parameter ID in which to store the value DINT 2 controller ID DINT 3 attribute ID download lot attribute Download Material Track Database DINT O 1 Data DINT 1 parameter ID in which to store the value DINT 2 controller ID DINT 3 attribute ID download container attribute Download Material Track Database DINT 0 3 Data DINT 1 parameter ID in which to store the value DINT 2 controller ID DINT 3 attribute ID download container priority Download Material Track Database DINT O 4 assignment Data DINT 1 parameter ID in which to store the value DINT 2 material ID DINT 3 container ID DINT 4 feed type 1 add to container 2 distribute from container upload material attribute Upload Material Track Database DINT O 5 Data DINT 1 report ID that has the value DINT 2 controller ID DINT
84. nt Phase PDET A 47 Appendix B Using the PHASE Data Type 445 desde CSAs tea sad B 1 Set and Clear Equipment Phase Tag Values B 1 PHASE Data Typen oere aa Baty tiny barge genta a B 2 Appendix C PUNTO OSC sxe Se Sys a oy Lavra reine dist a a ts Rate atm ee Sass C 1 VIED shinai de stats oie whan Ree agli ek helmed A tas eet ns C 1 Open the Configuration for an Equipment Phase C 1 Configure an Equipment Phase oy 4 0 4258 a dee on wala we peat ns C 2 Chapter 1 Introduction What is PhaseManager PhaseManager 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 Controller Name amp DaaType 7 Add w PHASE L Controller Tags E ae Add_Water State DINT fig Tasks 4 Add_Water Running BOOL Add_Water Holding BOOL fa MainTask Add Water Restarting BOOL An equipment phase directs 1 activity of your equipment A state model divides the activity into a set of states that have specific transitions E Add_Water_Phase he E Mix_Phase Running State Routine ae Drain_Phase How to add ZI water C ae Space_Parts_Phase Y Y 3 MainProgram 7 z Equipment phase instructions control the transitions between states
85. o action taken Publication LOGIX UM001A EN P May 2005 A 16 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Example Oo Controller Shear_One eat i eee The equipment program watches for the following faults vent_Base Sy Shear_One_Phase e faulted axis 48 Shear_One_Equipment Program e jammed material A Program Tags i Eh MainRoutine If there is a fault then B check For_Faults Local_Interface Equipment_Faults_ Cleared 0 This tag is an alias for the Clear_Faults K controller scoped tag Shear_1 Conveyor _Control B Disable_Axis E Enable_Axis B Home_Reference Controller Shear_One The prestate routine of the equipment phase watches for the equipment program to signal a Tasks fault 3 Event_Based 5 Shear_One_Phase e f Interface_To_Equipment Equipment_Faults_ Cleared 0 then there is a fault A Phase Tags e Both nterface_To_Equipment and Local_I nterface are aliases for Shear_1 so they E A have the same values Aborti Be awit If there is a fault Then ER Resetting Give the Shear_One_Phase equipment phase the abort command The POVR sq Restarting ER Running Ee Stopping 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 sc
86. oller Fault Handler 3 Power Up Handler E Tasks 1 5 S praan dis 3 New Program 3 New Equipment Phase N Cut New Equipment Phase Schedule in CA MainT ask ne I Inhibit Equipment Phase Create a State Routine C Controller MyController 3 6 Tasks MainTask amp MainProgram 1 aR 3 Unscheduled rams Phases BA New Phase State Routine h A New Routine New Parameter Description Ladder Diagram InPhase 3 My_ Phase J Open Routine on OK Publication LOGIX UM001A EN P May 2005 PhaseManager Quick Start Manually Step Through the Before you begin States Before you do this procedure do the following e Download the project to the controller e Put the controller in run or remote run mode Actions Step Notes L Controller MyController 3 8 Tasks 3 48 MainTask amp MainProgram z EI Uf6cheduled verify Cross Reference Ctrl E Monitor Equipment Phase X a 1 Right click the equipment phase and choose Monitor Equipment Phase 2 3 f Equipment Phase Monitor My_Phase 10l x Owner s lt none gt Equipment Phases viy Phase 2 Click the ownership button and then Yes take ownership This lets you use this window to step through th
87. on rung condition in Based on the rung condition in and the instruction the controller sets the rung condition following the instruction rung condition oub which in turn affects any subsequent instruction input instruction output instruction m F N i aaa ae rung in rung out condition condition 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 Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 3 Prescan of Routines The controller also prescans routines Prescan is a special scan of all routines in the controller During prescan the controller e scans all main routines e scans all state routines of equipment phases e scans all prestate routines of equipment phases e scans all subroutines of programs and equipment phases one time Once the controller prescans a subroutine it does not prescan the subroutine again during that prescan e scans all routines called by FOR instructions of a ladder diagram routine e ignores jumps that could skip the execution of instructions e executes all instructions in prescan mode For details on how a specific instruction operates during prescan see the Execution section for t
88. ontainer Binding Priority DownloadContainer BOOL Read only request is in process via a PXRQ instruction BindingPriority see if a Download Sufficient Material request DownloadSufficient BOOL Read only is in process via a PXRQ instruction Material see if a Download Material Track Database DownloadMaterialTrack BOOL Read only Data request is in process via a PXRQ DatabaseData instruction see if a Upload Material Track Data Container UploadMaterialTrackData BOOL Read only In Use request is in process via a PXRQ ContainerlnUse instruction see if a Upload Container Binding Priority UploadContainderBinding BOOL Read only request is in process via a PXRQ instruction Priority see if a Upload Material Track Database Data UploadMaterialTrackData BOOL Read only request is in process via a PXRQ instruction baseData see if your logic has aborted a PXRQ AbortingRequest BOOL Read only instruction Publication LOGIX UM001A EN P May 2005 PHASE Data Type B 5 If you want to Then check this Datatype Notes member see if RSBizWare Batch software has new NewlInputParameters BOOL e Read only parameters for an equipment phase e RSBizWare Batch software sets this bit when it has new parameters for an equipment phase e To clear the NewlnputParameters bit use a PRNP instruction initiate a producing state Producing BOOL Logix5000 equipment phases don t have a producing state To create a producing state use the Producing bit initiate a st
89. phase 24582 The program already owns the equipment phase 24593 One of the following already owns the equipment phase e external sequencer RSBizWare Batch software e another program in the controller 24594 Equipment phase is inhibited unscheduled or in a task that is inhibited not affected Fault Conditions none Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e The instruction executes na e The rung condition out is set to true scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction tries to take ownership of the The instruction tries to take ownership of the specified equipment phase specified equipment phase postscan The rung condition out is set to false No action taken Publication LOGIX UM001A EN P May 2005 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 45 Example Relay Ladder If Step 7 1 first step in the sequence then Each PATT instruction tries to take ownership of an equipment phase If the Result of a PATT instruction 0 or 24582 the program owns the equipment phase
90. pment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET equipment Phase Command Use the PCMD instruction to change the state or substate of an PCMD equipment phase Operands PEMD Relay Ladder Equipment Phase Command Phase Name R intinn Command Operand Type Format Description Result f Phase Name phase name of the Equipment phase that you want to change to equipment a different state phase Command command name of the Command that you want to send to the command equipment phase to change its state For available commands see Figure A 1 Result DINT immediate To let the instruction return a code for its tag success failure enter a DINT tag in which to store the result code Otherwise enter 0 PCMD PhaseName Structured Text Command Result The operands are the same as those for the relay ladder PCMD instruction Description The PCMD instruction transitions an equipment phase to the next state or substate Figure A 1 States Substates and Commands of an Equipment Phase state 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 es in the running state the equipment phase executes its running state routine Hold Holding Start Other states use a Phase State Complete PSC instruction to
91. quipment hase Failure PCLF tie Operands Relay Ladder PCLF Equipment Phase Clear Failure aee A O e Phase Name Operand Type Format Description Phase Name phase name ofthe Equipment phase whose failure code you equipment want to clear phase PCLF Phase Name Structured Text The operands are the same as those for the relay ladder PCLF instruction Description The PCLF instruction clears the failure code for an equipment phase e You must use a PCLF instruction to clear the failure code of an equipment phase e A CLR instruction MOV instruction or assignment doesn t change the failure code of an equipment phase e 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 RSBizWare Batch software or another program owns the equipment phase Arithmetic Status Flags not affected Fault Conditions none Publication LOGIX UM001A EN P May 2005 A 22 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e The instruction executes na e The rung condition out is set to true scan of structured text na In structured text ins
92. quishes ownership of the equipment phases e clears the ownership flags bits that the SFC set when it took ownership of the equipment phases The P1 qualifier limits this to the first scan of the step P4 Relinquish_Qwnership DET Add Water Ownership O 0 Complete DET Add Ingredient Ownership 1 0 DET Agitate Ownership Z 0 DET Drain Tank Ownership 3 0 Publication LOGIX UM001A EN P May 2005 Appendix B PHASE Data Type Using the PHASE Data Type The PHASE data type gives you status information about an equipment phase When you create an equipment phase RSLogix 5000 software creates a tag for the Data Ty status of the equipment phase E Drain_Tank PRSE H Drain_Tank State 64 DINT controller scope ED E fg a BOOL name phase name Tain_T ank Holding 0 BOOL PHASE data type Drain_Tank Restarting 0 BOOL jDrain_Tank Stopping 0 BOOL Set and Clear Equipment For most of the members of the PHASE data type you can only monitor its value You can control only the following members Phase Tag Values Member Control Method Steplndex If you program an equipment phase as a sequence of steps in ladder diagram or structured text use the StepIndex value as the step number or bit value SFCs automatically sequence through steps e To initialize the StepIndex value use the configuration properties for the equipment phase ial Equipment Phase Properti
93. r flow e Operator can e Operator can control equipment control equipment Cn nae a Key Publication LOGIX UM001A EN P May 2005 3 8 Guidelines State Model Worksheet Equipment Phase Space Parts 4 N C uap IDLE start r RUNNING i Hold Con 5 HELD omman omman one F N fault i e Set speed of exit e Speed of exit belt e No axes faults e Jog exit belt p WAR Z e All axes on e Gear other belts e Exit belt homed e Put 1 box on fine e Registration belt armed e ay box on each Done Hold Command Done RESTARTING istri RESETTING e Jog exit belt Command Clear axes faults Turn on all axes Home exit belt Arm registration Stop Abort Command Command Reset COMPLETE STOPPING Abort ABORTING Command e Run out boxes on Command f Turn off all axes coarse belt Not used e Stop coarse and fine belts e Empty exit belt SM e Stop exit belt Key Publication LOGIX UM001A EN P May 2005 R STOPPED eset Command e All axes off e SERCOS phased up e All network connections are ABORTED e All axes off e Boxes may still be on belts made J Guidelines 3 9 Separate equipment phase One advantage of an equipment phase is that it lets you separate the code from equipment code Step 1 Step 2 Step 3 Step 4
94. ration properties for the equipment phase e To advance to the next step use logic such as an MOV MUL or to increment the StepIndex value flag a specific exception for an equipment Failure DINT To Use phase fault failure off normal condition etc aE amevalie PFL instruction clear the Failure value PCLF instruction find the unit ID of an equipment phase UnitID DINT RSBizWare Batch software sets this value monitor the ownership of an equipment phase Owner DINT Read only see if an external request is in process via a PendingRequest DINT e Read only PXRQ instruction e Each bit the state of a specific request starting with bit 0 The bits are in the order shown by the request specific members below see if a Download Input Parameters request is DownloadInputParameters BOOL Read only in process via a PXRQ instruction see if a Download Input Parameters Subset DownloadInputParameters BOOL Read only request is in process via a PXRO instruction Subset see if a Upload Output Parameters request is UploadOutputParameters BOOL Read only in process via a PXRQ instruction see if a Upload Output Parameters Subset UploadOutputParameters BOOL Read only request is in process via a PXRQ instruction Subset see if a Download Output Parameter Limits DownloadOutput BOOL Read only request is in process via a PXRQ instruction ParameterLimits Publication LOGIX UM001A EN P May 2005 B 4 PHASE Data Type
95. reater than its current value e For example if a PFL instruction sets the failure code 102 another PFL instruction can only set the failure code gt 102 e 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 O To take action when a failure The PFL instruction writes its value to the Failure member of the PHASE tag for the equipment occurs monitor the Failure phase member of the PHASE tag Controller Tags MyPhas el zl When you create an equipment phase Scope J MyPhaseManaar IF ak RSLogix 5000 software creates a tag for the Name amp Value Data Ty status of the equipment phase _ Drain_Tank PHASE controller scope Drain_T ank State 64 DINT Drain Tank Rearing o BOOL name phase_name _ Dran Tank k Holding o BOOL PHASE data type i Drain_T ank Restarting 0 BOOL Ei Drain_T ank Stopping 0 BOOL Drain_Tank Aborting 0 BOOL E Drain_T ank Resetting o BOOL E Drain_Tank Idle 1 BOOL AE Drain_Tank Held 0 BOOL awe Drain_T ank Complete 0 BOOL Epez Drain_T ank Stopped 0 BOOL Drain TankAborted o BOOL amp Drain_Tank Substate o DINT E rain_T ank Pausing 0 BOOL E rain_Tank Paused 0 BOOL IE tain_T ank AutoPause n BOOL The PFL instruction writes its value to the __ bDrain_Tank Steplndex o DINT failure
96. rides all owners of the equipment phase The command works even if RSLogix 5000 software RSBizWare Batch software or another program already own the equipment phase Publication LOGIX UM001A EN P May 2005 A 14 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Guideline Q Make sure you want to override other owners Guidelines for Using the POVR Instruction Details Do you want the equipment to hold stop or abort even if you have manual control of the equipment phase via RSLogix 5000 software e YES Use the POVR instruction e NO Use the PCMD instruction This also applies to RSBizWare 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 Q Limit execution of a POVR instruction to a single scan 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 use methods such as e Execute the POVR instruction within a P1 Pulse Rising Edge or PO Pulse Falling Edge action e Place a one shot instruction before the POVR
97. ror The request was not Check that RSBizWare Batch software is connected and delivered because there is no subscriber running subscribed to the phase 0210 Communication error The request was not Check that RSBizWare Batch software is connected and delivered because there is no connection to running the Notify object 0410 Communication error Delivery failed Check the connection and communication path to RSBizWare Batch software 1010 Communication error The request was not Check that RSBizWare Batch software is connected and delivered because RSBizWare Batch running software does not subscribe to receive the external request 1020 RSBizWare Batch software isn t attached to Check that RSBizWare Batch software is attached to the the phase phase 04 0002 The RSBizWare Batch software Check the connection and communication path to encountered an error while processing the RSBizWare Batch software request 0003 The PXRQ instruction contains an invalid Check the connection and communication path to value RSBizWare Batch software 0004 RSBizWare Batch software is not in the Check the connection and communication path to proper state to process the request RSBizWare Batch software 0005 2 or more PXRQ instructions executed at the Limit execution to 1 PXRQ instruction at a time same time using different request types 0006 Error storing to parameter tags at end of Check the connection and communication path to request processing RSBizWare Batch sof
98. routine for an acting state e 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 e 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 instructions Specific instructions that you use to control an equipment phase See Appendix A PHASE tag When you add an equipment phase RSLogix 5000 software makes a tag for the equipment phase The tag uses the PHASE data type Use the tag to e see which state the equipment phase is in e hold a failure code for the equipment phase e hold an index for your steps e hold the unit ID e see the status of an external request to RSBizWare Batch software e see if RSBizWare Batch software has new parameters for the equipment phase e set up producing and standby states See Appendix B for more information about the PHASE data type Publication LOGIX UM001A EN P May 2005 Introduction 1 3 How does PhaseManager PhaseManager helps you write the code for your equipment in a help me structured way This results in the same behavior for all the equipment across a plant Specifically PhaseManager helps you with qu
99. rward from that point Use the following questions to help you For this State Ask Stopped What happens when you turn on power Resetting How does the equipment get ready to run Idle How do you tell that the equipment is ready to run Running What does the equipment do to make product Holding How does the equipment pause without making scrap Held How do you tell if the equipment is safely paused Restarting How does the equipment resume production after a pause Complete How do you tell when the equipment is done with what it had to do Stopping What happens during an normal shutdown Aborting How does the equipment shutdown if a fault or failure happens Aborted How do you tell if the equipment is safely shutdown 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 5 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 UM001A EN P May
100. state e APCLF instruction clears the failure code e RSBizWare Batch software clears the failure code See page A 17 for more information 6 Use a PCLF instruction to cleara The Equipment Phase Clear Failure PCLF instruction clears the failure code for an equipment failure code phase e ACLR instruction MOV instruction or assignment doesn t change the failure code of an equipment phase e f 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 A 21 for more information Publication LOGIX UM001A EN P May 2005 3 16 Guidelines H E Controller MyPhaseManager E S Tasks 3 48 MainTask E Add_Water Phase Tags Prestate_Routine Ez Holding Eig Resetting Eig Restarting ae Running i Heat Ry Add_Ingredient E Agitate 8 Drain_Tank My_Devices_200ms OB vessel_V1 A Program Tags FES Valves_n_Agitate F FE FE ng 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 progra
101. tPressed on for 1 scan The ONS instruction makes sure that My_ nputs AnyStartPressed turns on only when a start button goes from off on My_Inputs StartOneShot My _Inputs AnyStartPressed ONS StartButtonPanel StartButtonHMl If the equipment phase is in the idle state and My_ nputs AnyStartPressed on then The PCMD instruction gives MyPhase the start command PCMD Equipment Phase Command Phase Name MyPhase Command Start Result 0 MyPhase lde My _Inputs AnyStartPressed Controller Shear_One 3 6 Tasks E SS Event_Based Ezi Shear_One_Phase C3 Shear_One_Equipment A Program Tags ER MainRoutine B Check_For_Faults B Clear_Faults E Conveyor_Control B Disable_Axis E Enable_Axis B Home_Reference Controller Shear_One Tasks H S Event_Based i Shear_One_Phase A Phase Tags Er Prestate_Routine Ek Aborting Ee Holding Ee Resetting Es Restarting Running Ee Stopping Interface_To_Equipment Equipment_Faultts_Cleared Fault_Strobe Guidelines 3 23 Example 3 Jam Detection The equipment program watches for the following faults e faulted axis Program e jammed material ee If there is a fault then Local_Interface Equipment_Faults_ Cleared 0 This tag is an alias for the controller scoped tag Shear_ The prestate routine of the equipment phase watches for the equipment program to signal a fault e f Interface_To_Equipment Equipment_Fau
102. ta about the container Download Material Track Data DINT O 1 currently in use Container In Use DINTI attribute ID DINT 2 parameter ID in which to store the value download data about the current Download Material Track Data DINT O 2 material inside the container Container In Use currently in use DINT 1 attribute ID DINT 2 parameter ID in which to store the value download data about the current Download Material Track Data DINT O 3 oe the container currently in Container In Use DINTI attribute ID DINT 2 parameter ID in which to store the value upload data about the container Upload Material Track Data DINT O 1 currently in use Container In Use DINTI attribute ID DINT 2 parameter ID that has the value upload data about the current Upload Material Track Data DINT O 2 material inside the container Container In Use currently in use DINT 1 attribute ID DINT 2 parameter ID that has the value upload data about the current lot Upload Material Track Data DINT O 3 be the container currently in Container In Use DINTI attribute ID DINT 2 parameter ID that has the value Publication LOGIX UM001A EN P May 2005 If you want to Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Then configure the PXRQ instruction as follows A 29 External Request Data Value Value Array Element download the current binding s Download Contai
103. tch Equipment Phase External Request relay ladder A 23 software PXRQ structured text clear the NewlnputParameters bit of an Equipment Phase New Parameters relay ladder A 34 equipment phase PRNP structured text set up breakpoints within the logic of an Equipment Phase Paused PPD relay ladder A 37 equipment phase structured text take ownership of an equipment phase to Attach to Equipment Phase PATT relay ladder A 42 either structured text e prevent another program or RSBizWare Batch software from commanding an equipment phase e make sure another program or RSBizWare Batch software does not already own an equipment phase relinquish ownership of an equipment phase Detach from Equipment Phase PDET relay ladder A 47 Publication LOGIX UM001A EN P May 2005 structured text Equipment Phase Instructions PSC PEMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 5 Phase State Complete PSC Operands m Relay Ladder none Structured Text PSC none Use the PSC instruction to signal an equipment phase that the state routine is complete so go to the next state You must enter the parentheses after the instruction mnemonic even though there are no operands Description The PSC instruction signals the completion of a phase state routine Start Hold gie es Resetting Restarting Auto Pause Abort Complete Stopping Aborting Stopped z Aborted In the running state routine use the PSC
104. ternal Request Data Value Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 23 Use the PXRQ instruction to initiate communication with RSBizWare Batch software Relay Ladder Operand Type Format Description Phase PHASE_INSTRUCTION tag tag that controls the operation Instruction External request name type of request Request For available requests see page A 26 Data Value DINT array tag parameters of the request Structured Text For array size and data values see page A 26 The operands are the same as those for the relay ladder PXRQ instruction PHASE_INSTRUCTION Data Type If you want to Thencheck Datatype Notes or set this member determine if a false to true transition caused EN BOOL See Figure A 2 on page A 25 the instruction to execute determine if the request failed ER BOOL See Figure A 2 on page A 25 To diagnose the error see the ERR and EXERR values determine if the RSBizWare Batch software PC BOOL See Figure A 2 on page A 25 has completed its processing of the request determine if the RSBizWare Batch software is IP BOOL See Figure A 2 on page A 25 processing the request determine if the instruction sent the request WA BOOL See Figure A 2 on page A 25 but RSBizWare Batch software has not yet WA also 0 if acknowledged it e connection times out e network error occurs e ABORT 1 cancel the request ABORT BOOL To abort cancel the request s
105. tine runs all the time even when the equipment phase is in the idle state It runs before each scan of a state Do you want to run a prestate routine e YES Select the routine that you want to run e NO Leave this box set to lt none gt A fault routine lets you clear a major fault made by an instruction Do you want to set up a fault routine for the instructions in this equipment phase e YES Select the routine that you want as your fault routine e NO Leave this box set to lt none gt 3 Inhibit Equipment Phase Do you want the controller to run this equipment phase e YES Leave this box unchecked or uncheck it e NO Check this box 4 Initial State Which state do you want the equipment phase to go to when you turn on the controller e idle e complete e stopped e aborted 5 Complete State Immediately If not Implemented 6 Initial Step Index Do you want the equipment phase to skip any states that you aren t using e YES Leave this box checked or check it e NO Uncheck this box A Are any of the state routines in ladder diagram or structured text Publication LOGIX UM001A EN P May 2005 e NO Skip this box e YES Go to step B B Do any of those state routines use step numbers e YES Type the number for the first step of each state e NO Skip this box The tag for the equipment phase has a StepIndex number The controller resets the Steplndex each ti
106. tions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 33 Example Relay Ladder If ThisPhase Stepindex 1 1 The routine is at step 1 then Send the Acquire Resources request to RSBizWare Batch software The DataValues tag is a DINT array that contains the equipment IDs of the resources When RQ_Control 0 PC 1 or RQ_Control 0 ER 1 The request is complete or it failed then Done 1 This signals the sequence to go to the next step ThisPhase Steplndex 1 lt Add_ Y1 Steplndex 1 gt PAG Equipment Phase External Request Phase Instruction RO_Control 0 Ro External Request Acquire Resources P gt Data Value Data alues Co RG_Control 0 PC Step_Done RG_Control 0 ER Structured Text This action executes one time to initialize the data values of the PXRO instruction to the equipment IDs of the resources it will acquire P41 u Action_004 cel f Setup the resources to be acquired Step_000 These are the Batch Equipment Ids of the resources DataValues 0 l DataValues 1 2 DataValues 2 3 N _ f Action_o00 f Perform the External Request to the Batch Server Hf Step O00 FS OR NOT RQ Control 0 PC then PXRQ RQ Control 0 AcquireResources DataValues end if Tran_000 RQ Control 0 PC If Step_000 FS 1 first scan of the step Or RQ_Control 0 PC 0 The PXRQ instruction is in process then Send the Acqu
107. to the next step in the Sequence P41 E Clear_Axis_F aults y_Equipmnent FaultReset Step_000 PO Clear_Axis_F aults_Reset y_Equipment FaultReset E Tran_ooo My_Equipment FaultResetDone f Tran_001 My_Equipment EnableDone My_Equipment FaultReset My Axis Vars sc ResetFaults My Equipment FaultReset 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 My Axis Vars sc ResetFaults MAFR Motion Axis Fault Reset Axis Motion Control My Axis E Ml_FaultReset ASR Motion Axis Shutdown Reset Axis Motion Control My_Axis J Ml_ShutdownR eset My_E quipment Faulted My_Equipment FaultResetD one H Publication LOGIX UM001A EN P May 2005 3 12 Guidelines Separate normal execution 4 state model makes it much easier to separate the normal execution from exceptions of your equipment from any exceptions faults failures off normal conditions Use the resetting running and stopping states Use the holding restarting and aborting states to for the normal execution of the equipment handle exceptions faults failures off normal conditions a a a 7 Resetting Stopped Aborted L Guideline Details 1 Use the prestate routine to watch for faults yer prestate routin
108. tructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction clears the value of the failure code The instruction clears the value of the failure code for the specified equipment phase for the specified equipment phase postscan The rung condition out is set to false No action taken 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 Drain_T ank_Restart PCLF Equipment Phase Clear Failure Phase Name Drain_Tank PCMD Equipment Phase Command Phase Name Drain_Tank Command Restart Result 0 Drain_Tank_Restart Structured Text If Drain Tank Restart on then Clear the failure code for the Drain Tank equipment phase Restart the Drain Tank equipment phase Turn off Drain Tank Restart If Drain _Tank Restart Then PCLF Drain Tank PCMD Drain Tank Restart 0 Drain Tank Restart 0 End If Publication LOGIX UM001A EN P May 2005 Equipment Phase External Request PXRQ Operands Equipment Phase External Request Phase Instruction External Request Data Value PXRQ Phase_Instruction Ex
109. ts Fine_Belt_Vars sc ResetF aults Exit_Belt_Yars sc RiesetFaults MAFR Motion Axis Fault Reset Axis Coarse_Belt E Motion Control MI_FaultReset 0 ASR Motion Axis Shutdown Reset Axis Coarse_Belt E Motion Control Ml_ShutdownR eset 0 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 EQU Coarse_Belt_Vars ss Ok Equal Source 4 Coarse_Belt AxisF ault 16 0000_0000 D Source B 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 Coarse_Belt_Vars ss Ok My_Equipment Faulted Fine_Belt_Vars ss Ok Exit_Belt_Vars ss 0k Use alias tags Guidelines 3 31 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 e g copy paste simply point the phase scoped tags to new tags at the controller scope This reduces address fixes within the code Example Controller Tags MyPhaseManager controller oj x Scope J MyPhaseManage PHASE _ Agit t p gt mi Equipment Phase Tags Add_Water For more information gt f Monitor Tags The controller automatically makes a tag for an equipment phase The
110. ts the equipment phase to paused e Limiting your logic to one possible breakpoint at a time ensures that you pause at the required breakpoint L Choose the correct substate PPD instructions breakpoints work on y when the equipment phase is in the pausing substate To pause at Give this command Notes each true auto pause e When you start the equipment phase it goes breakpoint to the pausing substate e When you give the resume command after a pause the equipment phase remains in the pausing substate e To turn off auto pause give the auto pause command again first true pause e Give the pause command after you start the breakpoint equipment phase e To pause at another breakpoint give the resume command and then the pause command Arithmetic Status Flags not affected Fault Conditions none Publication LOGIX UM001A EN P May 2005 A 40 Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Execution Condition Relay Ladder Action Structured Text Action prescan The rung condition out is set to false No action taken rung condition in is false The rung condition out is set to false na rung condition in is true The instruction executes na scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instr
111. tware 05 0000 RSBizWare Batch software received the Check the connection and communication path to request but passed back an invalid cookie RSBizWare Batch software 06 0000 PXRQ instruction sent an invalid parameter Check the connection and communication path to to RSBizWare Batch software Arithmetic Status Flags not affected Fault Conditions none RSBizWare Batch software Publication LOGIX UM001A EN P May 2005 A 32 Condition prescan Execution Relay Ladder Action The rung condition out is set to false Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET Structured Text Action No action taken rung condition in is false The rung condition out is set to false na rung condition in is true e When the rung condition in goes from false to true the instruction executes one time e The rung condition out is set to true na scan of structured text na In structured text instructions execute each time they are scanned To limit the scan of an instruction use a qualifier of an SFC action and or a structured text construct instruction execution The instruction sends the specified request to RSBizWare Batch software The instruction sends the specified request to RSBizWare Batch software postscan The rung condition out is set to false Publication LOGIX UM001A EN P May 2005 No action taken Equipment Phase Instruc
112. ublication LOGIX UM001A EN P May 2005 3 18 Guidelines Use the PCMD instruction to transition to a different state 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 RSBizWare Batch software in place of a PCMD instruction to trigger transitions Use the state model to see which transitions need a PCMD instruction PCMD instruction PSC instruction I Start done done do AA done Restart Stop Abort Reset Abort Stopping Aborting done done Reset Stopped Aborted Type of transition Description Instruction Command A command tells the equipment to start doing something or do something PCMD different For example the operator pushes the start button to start production and the stop button to shutdown Use an Equipment Phase Command PCMD instruction PhaseManager uses these commands to give a command Or use RSLogix 5000 software reset stop restart start hold abort See page A 8 for more information Done Equipment goes to a waiting state when it s done with what it s doing You PSC set up your code to signal when the equipment is done The waiting state shows that the equipment is done Exception
113. uction execution Substate Action Substate Action pausing e The substate paused pausing e The substate paused e The Paused bit of the PHASE tag e The Paused bit of the PHASE tag 1 1 e The rung condition out false notpausing The rung condition out true notpausing No action taken postscan The rung condition out is set to false Publication LOGIX UM001A EN P May 2005 No action taken Equipment Phase Instructions PSC PCMD POVR PFL PCLF PXRO PRNP PPD PATT PDET A 41 Example Relay Ladder If the equipment phase is in the pausing substate And ThisPhase Steplndex 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 Qu TON Equal Timer On Delay Source ThisPhase Steplndex Timer FillT ime lt Add_Water Steplndex gt Preset 10000 20 Accum 10000 Source B 20 FillTime DN Source Dest ThisPhase Steplndex lt Add_ Water Steplndex gt 20 Structured Text Step_001 T o Tngredient Add S2T 0 S2 State Cmnd 0 PO uf Action_004 Step_001 LJ If Step_001 DN 1 The step ran for the preset time then eee Ingredient_Add State_Cmnd 0 stop a
114. up where you left off In that case you probably don t need to reset the code in the running 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 3 Use an SFR instruction to reset the SFC of a state routine 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 Running Resetting Holding Holding Let the SFC reset itself at the last step Restarting Reset the restarting routine in both these routines e Holding n case you go back to holding before you finish restarting e Restarting Let the SFC reset itself at the last step 4 Use the PCMD instruction to go to an allowed next state PhaseManager 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 since that transition is
Download Pdf Manuals
Related Search
Related Contents
VTC-HOCRBD4F Manual Aurora AF10 Installation Guide StuffIt 2010 für Macintosh Benutzerhandbuch ENGLISH User manual Cahier Conflits - Biens et services des écosystèmes forestiers Analyzing and Troubleshooting Single Warranty User Manual Invotel SX8800 mod. huelva instrucciones de uso instruction Onkyo CS-525 User's Manual 取扱説明書 サイドスタンド エクステンション ご使用前に必ずご確認ください Copyright © All rights reserved.
Failed to retrieve file