504bloke
Lifetime Supporting Member
Alaric said:B3/80 is short hand for B3:5/0.
See the attached for the changes Ken made plus the changes I recommended. Its up to 154 words of memory left now instead of 24 - more than enough to program several dozen more rungs.
RSLogix has a compare tool under Tools -> Compare that will compare this program with your original in side by side windows so you can easily find the changes and see the difference they make.
I also cleaned up the nested branches you had in the first three rungs of ladder 2. Extend branches, don't nest them. To extend a branch right click on the branch leg and select extend up or extend down, or if using the mnemonic editor type in NXB. Nesting branches adds more instructions and takes longer to process than extending branches.
I also changed the way non-retentive timers T4:1, T4:3, T4:5, T4:7, T4:9, T4:11, T4:13, T4:15, T4:17,T4:19 were reset, recovering 21 words.
I noticed you use a lot of JMP instructions. There is nothing wrong with the JMP instruction (I use it frequetly for looping) but I think some of your use of it could be avoided by structuring the program a little differently. Just say "no" to spaghetti code.
All in all though, pat yourself on the back.
Interesting thread, nice to see you chaps here helping someone out again
Alaric:
You learn something new every day !!
I didnt know Logix500 had nested branches !
Have never seen them or had the need to use them...
Nice to know you never stop learning