User manual

86 Publication LOGIX-AP010B-EN-P - May 2010
Chapter 3 Software Conversions Instructions
Block Call Operations
S5 refers to independent portions of code as blocks while RSLogix 5000
software refers to these as subroutines.
S5 uses two block call instructions, Jump Conditional (JC) and Jump
Unconditional (JU), to call other program blocks.
RSLogix 5000 software has a similar JumpToSubroutine (JSR) instruction to
implement this operation. Comparison or Boolean logic can be placed in front
on the RSLogix 5000 JSR instructional to achieve the functionality of the S5
conditional block call function.
At the end of each block S5 has the following instructions:
Block End (BE) -Identifying the end of a function/program block
Block End Conditional (BEC) - Causes the current program/function
block to end if the proceeding conditions are true.
Block End Unconditional (BEU) - Causes the current program block to
end unconditionally
RSLogix 5000 software has a similar ReturnFromSubroutine (RET)
instruction to implement this operation. Comparison or Boolean logic can be
placed in front on the RSLogix 5000 RET instructional to achieve the
functionality of the S5 Block End Conditional and Block End Unconditional
function.
It is not necessary to specify the end of an RSLogix 5000 program subroutine.
If it is not specified then the code assumes that the routine ends when the last
instruction in the routine has been executed.