SBR Subroutine and RET Return - The SBR Subroutine instruction serves no purpose and is always evaluated as true. Multiple JMP Jumps can use the same LBL Label. A JMP instruction will skip the execution of rungs until it encounters its associated LBL label. JMP Jump and LBL Label - These two instructions allow you to skip over rungs. Therefore, the RET is unnecessary and can only add confusion in how the program is scanned. ![]() If you look in the RsLogix 500 help file, it states "Without a RET instruction, the END statement (always present in the subroutine) automatically returns program execution to the JSR instruction in your calling ladder program.". I've had a few people say that you should have a RET "just in case". Note that when using the JSR as done above the RET return instruction is not necessary.
0 Comments
Leave a Reply. |