1756-PM003H-EN-E, SFC and ST Programming Languages ...
1756-PM003H-EN-E, SFC and ST Programming Languages ...
1756-PM003H-EN-E, SFC and ST Programming Languages ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Program Control Instructions (JSR, RET, SBR) 10-7<br />
Arithmetic Status Flags:<br />
Arithmetic status flags are affected.<br />
Fault Conditions:<br />
A major fault will occur if: Fault type: Fault code:<br />
JSR instruction has fewer input parameters than SBR instruction 4 31<br />
JSR instruction jumps to a fault routine 4 or user-supplied 0 or user-supplied<br />
RET instruction has fewer return parameters than JSR instruction 4 31<br />
main routine contains a RET instruction 4 31<br />
Execution:<br />
Relay Ladder <strong>and</strong> Structured Text<br />
Condition: Relay Ladder Action: Structured Text Action:<br />
prescan<br />
The controller executes all subroutines regardless of rung condition. To ensure that all rungs in the<br />
subroutine are prescanned, the controller ignores RET instructions. (I.e., RET instructions do not exit<br />
the subroutine.)<br />
• Release 6.x <strong>and</strong> earlier, input <strong>and</strong> return parameters are passed.<br />
• Release 7.x <strong>and</strong> later, input <strong>and</strong> return parameters are not passed.<br />
If recursive calls exist to the same subroutine, the subroutine is prescanned only the first time. If multiple<br />
calls exist (non-recursive) to the same subroutine, the subroutine is prescanned each time.<br />
The rung-condition-out is set to false (relay ladder only).<br />
rung-condition-in is false to<br />
the JSR instruction<br />
rung-condition-in is true<br />
The subroutine does not execute.<br />
Outputs in the subroutine remain in their last state.<br />
The rung-condition-out is set to false.<br />
The instruction executes.<br />
The rung-condition-out is set to true.<br />
EnableIn is set na EnableIn is always set.<br />
The instruction executes.<br />
na<br />
na<br />
Publication <strong>1756</strong>-<strong>PM003H</strong>-<strong>EN</strong>-E (excerpt from <strong>1756</strong>-RM003H-<strong>EN</strong>-P) - August 2005