Reference (REF)
This information applies to the CompactLogix 5370, ControlLogix 5570, Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380, CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix 5580 controllers.
The Reference (REF) Instruction associates a reference with the address of an axis or coordinate system concrete tag.
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 Instructions
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
REF(Source, Reference);
Operands
Operand | Type | Format | Description |
---|---|---|---|
Source | AXIS_CIP_DRIVE AXIS_CONSUMED AXIS_GENERIC_DRIVE AXIS_SERVO AXIS_SERVO_DRIVE AXIS_VIRTUAL COORDINATE_SYSTEM | Immediate Tag | Name of the axis or coordinate system to reference. |
Reference | REF_TO_AXIS_CIP_DRIVE REF_TO_AXIS_CONSUMED REF_TO_AXIS_GENERIC_DRIVE REF_TO_AXIS_SERVO REF_TO_AXIS_SERVO_DRIVE REF_TO_AXIS_VIRTUAL REF_TO_COORDINATE_SYSTEM | Tag | Name of the reference to be populated. |
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction.
Execution
Condition/State | Action Taken |
---|---|
Prescan | The instruction uses the Source address to populate the Reference. |
Rung-condition-in is false | Set Rung-condition-out to Rung-condition-in. The instruction uses the Source address to populate the Reference. |
Rung-condition-in is true | Set Rung-condition-out to Rung-condition-in. The instruction uses the Source address to populate the Reference. |
Postscan | The instruction uses the Source address to populate the Reference. |
Error Codes
None specific to this instruction.
Example
Relay Ladder
Structured Text
REF(AxisCip, Ref_AxisCip);
Provide Feedback