Skip a rung during scan

ceilingwalker

Lifetime Supporting Member
Join Date
Mar 2010
Location
Phoenix, AZ
Posts
1,586
Good day all. I was taught at the PLC boot camp how to skip a rung durning a scan (or permanently skip it) but I can't remember how it's done (forgive me please Ron). Could someone please refresh my memory? Thank you
 
The code inside of a subroutine can be skipped by not calling the subroutine. Use with care.

Also the pair of commands, JMP and LBL can bracket rungs to be skipped if the logic leading up to the JMP are true. But again, use with care.
 
In addition, with A/B PLCs that support online editing, you can delete a rung online and test edits to skip it temporarily. Assemble edits to skip it permanently.

With any of these methods, skipping the logic means that the output instructions don't execute at all, so for example, a rung will not turn off it's OTE instruction, the address being skipped won't be updated and will retain whatever information it already holds, unless there is other logic writing to it.
 
We used it at the Boot Camp for trouble shooting, as I recall. However, I have a ladder that I want to run all but one rung, but I don't want to delete the rung, in case it is controlling one of the nearly 58 other ladder's. I have done a search all, but I've learned that is not totally conclusive either.
 
If you use the edits and delete the rung (mark it for deletion, accept it, and test edits), the rung won't be truly deleted until you assemble edits. When you want to restore the rung, then simply untest edits and cancel them.

If you need to use online editing while this rung is being skipped, then use the JMP/LBL pair with a condition (XIC your_bit) in front of the JMP. Then you can toggle the bit ON to skip the rung(s), and off to keep the rung(s) in scan.
 
I usually have a bit called aaaChanges and use a xio or xic at the start of the run when doing online editing. This way I can see exactly what I've been playing with and using reference tool (RSLogix 5k) I can simply find all my edits.
 
We used it at the Boot Camp for trouble shooting, as I recall. However, I have a ladder that I want to run all but one rung, but I don't want to delete the rung, in case it is controlling one of the nearly 58 other ladder's. I have done a search all, but I've learned that is not totally conclusive either.

See if this LINK refreshes your memory
 
The code inside of a subroutine can be skipped by not calling the subroutine. Use with care.

Also the pair of commands, JMP and LBL can bracket rungs to be skipped if the logic leading up to the JMP are true. But again, use with care.
I agree with Bernie on this one.
Use the Jump and Label.
Even if you end up not deleting the rung it will still be there as a reminder of sorts of the original setup.
 
You may be thinking of an AFI = always false instruction. You should be able to double click on your rung, then add AFI to the beginning of your rung editing text box. This will disable the rung from being scanned. Hope this helps.
 
Last edited:
You may be thinking of an AFI = always false instruction. You should be able to double click on your rung, then add AFI to the beginning of your rung editing text box. This will disable the rung from being scanned. Hope this helps.

Here is the entire thread from which the link that I posted above came from. Ron Beaufort talks about the AFI instruction. Some very good reading.
 
You may be thinking of an AFI = always false instruction. You should be able to double click on your rung, then add AFI to the beginning of your rung editing text box. This will disable the rung from being scanned. Hope this helps.

The AFI doesn't disable the rung from being scanned, it merely makes the rung (or branch, where ever you put it) false due to the false instruction.
 
Greetings Ceilingwalker ...

you're probably thinking of the classroom experiments where we temporarily DELETED the rung while in the Run mode – and then TESTED the edits – in order to take the rung out of the scan for a few minutes for troubleshooting purposes ...

remember that we didn't ASSEMBLE the edits – so the rung was never actually "deleted" ... instead it was merely taken out of the scan for a minute or so before we then UNTESTED and CANCELED the edits to put the rung back into the scan ...

naturally as in making ANY change to the program, this has to be done with extreme caution ...

now then ...

if you decide to take a particular rung out of the scan for longer than just a few minutes (for example, suppose that you plan to "walk away" from the program while the rung is left disabled) then the method of using a JMP (Jump) and an LBL (Label) is the method that we used ... (you might remember the story of the two young programmers who had been unsuccessfully trying to temporarily "disable" about twenty of their rungs by using AFI instructions while working on their juice packaging equipment) ...

keep in mind that as we demonstrated with the "Widow Maker" exercise, the AFI instruction doesn't really "disable" or "deactivate" the rung the way that the manuals say that it does ... instead it merely makes the rung execute with FALSE logic ... specifically, the AFI instruction does NOT "take the rung out of the scan" ...

so (for examples) ...

an OTE instruction on an "AFI" rung will indeed still execute (with FALSE logic) – and go write a ZERO into its assigned bit/box ...

a TON instruction on an "AFI" rung will indeed still execute (with FALSE logic) – and effectively "reset" the timer ...

in other words, a rung marked with an AFI instruction DOES indeed still get executed ... on the other hand, a rung being DELETED and TESTED will NOT be executed ... and a rung being "jumped" over (with a JMP and LBL setup) will also NOT be executed ...

if this doesn't fully answer your questions, please post the section of your program that's confusing you and we'll be glad to dig deeper ...

 
... (you might remember the story of the two young programmers who had been unsuccessfully trying to temporarily "disable" about twenty of their rungs by using AFI instructions while working on their juice packaging equipment) ...

Yes, now I remember. Your little "stories" have helped me to remember a lot of things I forgot. You wouldn't happen to have a list of all those "stories", would you?

Just a side-note: after your class and the help from you guy's on this forum, I stepped in and made some critical repairs that the EE couldn't. I was promoted! Your class and the advise I've received here have given me a lot of confidence in myself. I have only been doing this for one year and the promotion was substantial! Thanks to you all.
 

Similar Topics

Does anyone know of a rugged PC based HMI that is pre-fabbed for installation inside heavy equipment? I have seen them in earthmovers/mining...
Replies
5
Views
2,309
So I've been trained to skip every second windows, as MS seem to use their B-Team developers. Eg. Skip win ME, straight to XP. Skip vista, use 7...
Replies
24
Views
8,820
Hello all I was trying to write a program for one application. In this application at two location of conveyor the dispensers are going to open...
Replies
2
Views
2,005
I’m repairing a PPH SAFELINE METAL DETECTOR and appear a FAULT 8 MESSAGE. I KNOW HOW TO REPAIR IT BUT: APPEARS THE FAULT MESSAGE BUT I CAN'T...
Replies
3
Views
4,617
Good day all. I have kind of an odd question. Is there a way to have a processor skip an input whilst reading all the remaining input signals...
Replies
10
Views
3,397
Back
Top Bottom