Attach to Phase (PATT)

This instruction applies to the Compact GuardLogix 5370 and Compact GuardLogix 5380, CompactLogix 5370, CompactLogix 5380, and CompactLogix 5480, ControlLogix 5570 and ControlLogix 5580, and GuardLogix 5570 and GuardLogix 5580 controllers.
TIP:
When using this instruction with ControlLogix redundancy system, outputs controlled by this instruction may not be bumpless during redundancy switchover, if the instruction and phase program are not scheduled in the highest priority task.
Use the PATT instruction to take ownership of an equipment phase to either:
  • Prevent another program or
    FactoryTalk Batch
    software from commanding an equipment phase.
  • Make sure another program or
    FactoryTalk Batch
    software does not already own an equipment phase.
The PATT instruction lets a program take ownership of an equipment phase.
  • Ownership is optional. As long as an equipment phase has no owners, any sequencer (program in the controller,
    FactoryTalk Batch
    software) can command an equipment phase.
  • FactoryTalk Batch
    software always takes ownership of an equipment phase.
  • Once a sequencer owns an equipment phase, no other sequencer can command the equipment phase.
This is a transitional instruction. Follow these steps when using it:
  • In ladder logic, insert an instruction to toggle the rung-condition-in from false to true each time the instruction should execute.
  • In a Structured Text routine, insert a condition for the instruction to cause it to execute only on a transition.
Available Languages
Ladder Diagram
PATT_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
PATT(Phase_Name,Result);
Operands
Ladder Diagram
Operand
Type
Format
Description
Phase Name
PHASE
Name of the equipment phase
Equipment phase to own.
Result
DINT
immediate
tag
To let the instruction return a code for its success or failure, enter a DINT tag in which to store the result code. Otherwise, enter 0.
Structured Text
The operands are the same as those for the Ladder Diagram PATT instruction.
Guidelines for using the PATT Instruction
Guideline
Details
Consider ownership if have multiple sequencers that use a common equipment phase.
Ownership makes sure that a program can command all the equipment phases it needs and locks out any other sequencers.
If using:
Then:
FactoryTalk Batch
software to also run sequences within this controller
Before executing the sequence (process), take ownership of all the equipment phases that the sequence uses.
Multiple programs to command the same equipment phase
None of the above
No need to own the equipment phases.
Remember that
Logix Designer
overrides the controller.
Regardless of whether a program or
FactoryTalk Batch
software owns an equipment phase, the option exists to use
Logix Designer
to override ownership and command the equipment phase to a different state.
This:
Overrides this:
Logix Designer
Controller (internal sequencer),
FactoryTalk Batch
software (external sequencer)
Controller (internal sequencer)
None
FactoryTalk Batch
software (external sequencer)
None
Use the Result operand to validate ownership.
Use the Result operand to get a code that shows the success or failure of the PATT instruction. To interpret the result code, see the
PATT Result Codes
section below.
Avoid or plan for a result code = 24582.
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 using a PATT instruction, either:
  • Limit its execution to a single scan to avoid the 24582 result code.
  • Include a result code = 24582 in conditions for ownership.
When the sequence is done, relinquish ownership.
To relinquish ownership, use a Detach from Equipment Phase (PDET) instruction.
PATT Result Codes
If assigning a tag to store the result of a PATT instruction, the instruction returns one of these codes when it executes:
Code (Dec)
Description
0
The command was successful.
24579
Logix Designer
or HMI already owns equipment phase. The caller is attached to the equipment phase, but it is not the current commanding owner.
  • This program now also owns the equipment phase.
  • Since the
    Logix Designer
    or HMI is higher priority than a program, the program cannot command the equipment phase.
  • High priority HMI ownership is specific only to
    CompactLogix
    5370 and
    ControlLogix
    5570 controllers.
24582
The program already owns the equipment phase.
24593
One of these already owns the equipment phase:
  • External sequencer (
    FactoryTalk Batch
    software)
  • Another program in the controller
24594
The equipment phase is unscheduled, inhibited, or in a task that is inhibited.
Affects Math Status Flags
No
Major/Minor Faults
None. See
Index Through Arrays
for operand-related faults.
Execution
For Structured Text, EnableIn is always true during normal scan. Therefore, if the instruction is in the control path activated by the logic, it will execute. All Conditions below the thick solid line can only occur during Normal Scan mode.
Condition/State
Action Taken
Prescan
No action taken.
Postscan
No action taken.
EnableIn is false
No action taken.
EnableIn is true
The instruction executes as described above.
Example
Ladder Diagram
If
Step.1
= 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), 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.)
PATT_LD_ex_v31
Structured Text
L5K_PATT_FC_ex_v32
Number
Description
1
At the first step in the sequence, the Take_Ownership action tries to take ownership of two equipment phases that the sequence uses.
2
Action_009 checks that the program owns the equipment phases. If the Result of each PATT instruction = 0 or 24282 (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.)
3
If the Ownership = 3 (The program owns both equipment phases as shown by bits 0 and 1.), then the SFC goes to the next step.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.