Beruflich Dokumente
Kultur Dokumente
Goes
What is In the FactoryTalk Batch Equipment Editor, you create a phase to represent
a group of equipment that performs a minor processing activity in a
PhaseManager?
manufacturing plant, and you create an equipment phase when you add a
specific instance of a phase to a unit.
1
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 1: PXRQ and the PXRQ the phase external request command
Phase Instruction The PXRQ instruction is used to request data or services from the batch
server. This command requires several things to implement it:
Note that you must have a clear phase instruction register for each PXRQ.
When a phase is reset, the Phase Instruction is cleared and ready to use
again. If, during the life of the running logic, a PXRQ is used, it must use a
phase instruction register that has been reset. To manage phase instructions
you will need two phase instructions. The first is the one you use in the
PXRQ, call it Download_Inputs. The second one is not used, but is used to
reset the first, call it Empty_PXRQ. After using a phase instruction, reset it
by using a COP instruction to copy the Empty_PXRQ to the
Download_Inputs, length = 1. This concept is demonstrated in Tip 2,
below.
See the Quick Reference for Configuring the PXRQ Instruction located in the
FactoryTalk Batch PhaseManager Users Guide (batch_phasemanager.pdf) for
information on the value that should be placed in the q[] array for each command
class to achieve a specific functionality.
2
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 2: Transfer of Transfer of control (TOC) must work in the same fashion as outlined in
Tip 1 a clear phase instruction register is required each time you generate
Control
a request. Again, using an COP instruction with a Empty_PXRQ each time
works well.
Note: You need to move an appropriate number into the q array prior
to using the PXRQ instruction. For the below example, a 2 has been
moved into q[0] to tell the PXRQ to use the TOC parameters.
2. Now, wait for an indication that the phase has new parameters
(Phase.NewInputParameters, formerly the DL bit), then do something
make sure the phase instruction is clear.
The PXRQ instruction with the batch server is next line. It will begin
the communications. Note the rung driving the PXRQ must be held
on during the life of the PXRQ communications with the batch server.
3
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
The .PC indicates the PXRQ instruction with the batch server is now
complete. It will then clear the New Instructions (PRNP) and clear the
Phase Instruction using a COP command. The COP resets the phase
instruction by copying an empty instruction. See Tip 1 above for more
discussion.
The .ER is used to determine whether or not there was in error in the
communications.
4
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
You must give the TOC time to exchange data with the server. If the
transitions between phases become true too quickly, then the server
and the phase can get out of synchronization.
5
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 3: Hold Logic PhaseManager does not have the native StepBuffer / Hold Index
management that is part of the PLI with OPC-based phases. The following
steps discuss building hold index management structure.
1. Build a User Defined Data Type and call it StepBuffer. It should contain
the following elements:
6
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
The states of Running, Holding and Resetting will each have some
logic. Place the logic at the top of the each state routine. The logic
(shown in Structured Text format) is as follows:
// For the Running logic, if the Restore flag is on, then restore the
holdindex to the stepindex.
IF StepBuffer.Restore THEN
Phz.StepIndex := StepBuffer.HoldIndex;
StepBuffer.Restore := 0;
END_IF;
StepBuffer.Restore := 1;
// For the Resetting logic, turn off the RESTORE flag (in case we
aborted / stopped from a hold state).
StepBuffer.Restore := 0;
7
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Running Logic
Holding Logic
Resetting Logic
8
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Step Instructions
StepBuffer.HoldIndex := Phz.StepIndex
END_IF;
Tip 4: Unit Tags Unit Tags still access the CLX registers using an OPC topic. If you have unit
tags you must create an additional CLX (of type OPC / RSLinx) in the area
model. Since we are using OPC to talk to the CLX, you must also create the
watchdog handshake routine in the CLX (to make ensure OPC
communication integrity).
9
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 5: Using Local There are major advantages in using local aliases to build phase logic. If
you use a local tag aliased to global tags, you can copy and paste code
Aliases
between phases.
For example:
In this example, the code uses the phz alias for all references to the phase;
all commands to the control module are to the alias control module. This
code can be copied and pasted into another agitator phase. By
implementing aliases that point to a new phase and control module, the
phase would be complete and ready to run.
You can also alias the local parameters and reports to global tags if you
want to make them visible on an HMI or to another phase.
10
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 6: Group the After running a SYNC from the Equipment Editor (select Synchronize
Logix5000 Data Servers from the Edit menu), all the phases will be
Phases by Unit
placed in the unscheduled program. It is a good practice to move the
phases into periodic tasks named after the units, as shown below. The
SYNC will still synchronize changes made to either the area model or the
phases even though you have moved them to a different task. The periodic
task should only be as fast as needed to conserve CPU; 100 msec for most
processes.
11
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 7: Do Not If you do not have any logic to put in a phase, such as the holding,
restarting or resetting logic, you do not need to create a phase state routine
Implement
for it. But make sure you have the Complete State Immediately if not
if Not Required Implemented box checked on the phase properties, as shown below.
12
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 8: Loss of You need to set up the phase to handle loss of communications. Two
settings under phase > options need to be set. External Sequencer Loss of
Communications
Communication Command should be set to Hold. None is the default. This
will put the phase to hold when it losses communications with the batch
server.
The External Request Hold Action should be set to Clear. None is the
default. This will clear any PXRQ instructions that are running when the
phase goes to hold. Make sure you return to a point above the PXRQ step
that will clear the Phase Instruction (see Tips 1 and 2) and then re-run the
PXRQ.
Tip 9: RSLinx The batch server uses CIP protocol to talk to the PhaseManager equipment
phases. RSLinx Lite and RSLinx Single Node do not support the CIP
protocol. Use RSLinx OEM, Gateway or Classic for communications
between the batch server and PhaseManager equipment phases.
13
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 10: Equipment When the Batch Server synchronizes with a Logix project, it saves the
equipment ID in the equipment phase. If you right-click on the phase in
ID
Logix 5000 and select Properties, you will see the Equipment ID.
EquipmentID := xxxx,
RecipePhaseNames := aaaaaa
where xxxx is the Equipment ID and aaaaaa is the Area Model Phase
Name. Be sure to include the commas that separate the different property
lines as well as the ending parenthesis. Now import the L5K file into a new
project.
14
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
Tip 11: Use If your phase has the possibility running two instances of the phase back to
back in a recipe, always implement a resetting routine. The routine can be
Resetting Logic on
limited to a single rung with PSC. This will force a reset and scan of the
Back-to-Back phase before the next instance.
Phases
Tip 12: Keeping the area model and the Logix project in sync can sometimes run
into problem. There are few rules.
Synchronization
Do not modify both the Logix project and the Area Model. Make
one of these the master and make the changes there and sync. If
you are using phase classes with multiple phase instances, it is best
to make all the changes in the area model and then push the
changes down to the Logix project.
15
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
It is possible to change the name of the Logix project file and the
re-sync to it after correcting the path in the data servers, but there
are issues that can arise if changes are implemented in the area
model and the Logix project. If file name changes are implemented,
re-sync before implementing changes.
If you are starting from RSLogix 5000, all you need to do is to create an
equipment phase. An equipment phase, with no input or output parameters
or state routines can be synchronized to the Batch area model. On the
FactoryTalk Batch side, you must have previously configured:
Tip 13: Reserved The batch server has reserved names for parameters and reports. If you use
them in a project, you will not be able to later implement these features
Names
without renaming them first. Also, you must be aware of the tags that will
be created in the Logix project.
Material Track:
Parameters: Amount, Amount, Container, Label, Lot, Material, Material Class
Control Strategy:
Parameter: Control_Strategy
Limits:
Parameters: ParameterName_H, _L, _M
The tags that are created in the Logix project are the same as above, but a
prefix underscore (_Amount).
16
TIPS ON USING PHASEMANAGER WITH FACTORYTALK BATCH
For an additional source of examples for PhaseManager see the Web site:
http://samplecode.rockwellautomation.com
One example project available for download from the sample code Web
site that shows using PhaseManager in a variety of ways is the sample
project PhaseManager and a Scalable Batching Solution.
Publication FTALK-WP001B-EN-E - September 2007 Copyright 2007 Rockwell Automation, Inc. All rights reserved.
17