12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

476 For/Break <strong>Instructions</strong> (FOR, FOR...DO, BRK, EXIT, RET)Return (RET)The RET instruction returns to the calling FOR instruction.Operands:Relay LaddernoneDescription:IMPORTANTDo not place a RET instruction in the main routine. If you placea RET instruction in the main routine, a major fault occurs (type4, code 31).When enabled, the RET instruction returns to the FOR instruction. TheFOR instruction increments the Index value by the Step size andexecutes the subroutine again. If the Index value exceeds theTerminal value, the FOR instruction completes and execution moveson to the instruction that follows the FOR instruction.The FOR instruction does not use parameters. The FOR instructionignores any parameters you enter in a RET instruction.You could also use a TND instruction to end execution ofa subroutine.Arithmetic Status Flags:not affectedFault Conditions:A Major Fault Will Occur If Fault Type Fault Codemain routine contains a RET instruction 4 31Execution:Condition:prescanrung-condition-in is falserung-condition-in is truepostscanRelay Ladder ActionThe rung-condition-out is set to false.The rung-condition-out is set to false.Returns the specified parameters to the calling routine.The rung-condition-out is set to true.The rung-condition-out is set to false.Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!