Always False / Always True RSlogix 500

Adam303

Lifetime Supporting Member
Join Date
Aug 2009
Location
Chicago
Posts
587
Hi guys I uploaded a project from one of our equipment in the plant and was looking thru its logic, can anyone please tell me why would someone use the Always false (B3:0/0) latch bit in the program, what can it possibly do in the program. I could not post the whole program so this is what I can give out. I have see this done in other programs too.

False_True.jpg
 
some people like to use those flags as markers so they can easily find parts of program they enabled/disabled. note that this is not true always_on / always_off because one can overwrite the value (at least for part of the scan) and cause unpredictable result. plcs with true always on/off flags don't have this issue.
 
Some folks like to have bits they can use to disable a rung for testing commissioning, or even for maintenance. Also, the PLC-5 has an instruction called AFI just for such purposes.

And, there are a shedload of SLC programmers who started out with the PLC-5.

So that's a "roll yer own" AFI (Always False Instruction) along with the always true.

Shorted branchlegs generate warnings, but XIC "Always_True" keeps the warnings away. I believe there may have been PLCs that forbid shorted branch legs. In any case, the always true bit can be used for testing.

Highlight the address and hit CTRL+F, <enter> followed by F3 (repeat F3 to jump to all the places it is used).

I don't use these bits much, but I do keep bits reserved for things such as "Test Latest Program Changes" and I might use that bit to swap in a new subroutine or multiple sections of code and tie it to a protected screen on the HMI. Then I can go home and know that if something goes haywire, the maintenance tech on shift can go to the HMI and "Untest" my logic for me.

I think all my PLCs presently in use except for a SLC 150 support shorted branchlegs, so I will use those and be able to quickly find them later. I prefer not to leave forces in a processor, and definitely avoid leaving edits testing overnight.

To disable a rung, I will add a series bit examine instruction of the opposite state of one already there, and add a rung comment...no special bits required, and it can't change states mid scan and foul up my intentions. I prefix my rung comments with YYYY-MM-DD: PEC: my initials. Then I can find those rungs very quickly by searching for the initials or the year/month.
 
Last edited:
You see it lots of times in programs. The Controllogix line even has an AFI (Always False Input) and a NOP (No Operation). They can be used for place markers for future code, a flag during debugging, etc. But you would never see an OTL for B3/0 or a OTU for B3/1. These two rungs really have no function other than to reset the bits as they should be if someone toggles one, but they are extremely helpful when looking at a program you are unfamiliar with and that is undocumented. This makes it clear that they would never be on or off.
 
And... the first instructions on those rungs are not necessary.

Setting a value FALSE if it is true, versus setting it FALSE every scan of the program are the same thing.

The presence of the XIC and the XIO on those rungs indicates habit, superstition, or both.

That being said, I use logic like this to set an "AFI-like" BOOL in all my programs with my initials as the label or tag name. That way if I use it for jumpers or disables, the person who comes after me knows who to ask about it or who to yell at.
 
This is the first Rung in every PLC Program that I write. I use them for Testing, Troubleshooting, and temporarily Bypassing or disabling portions of PLC Code. As Ken stated, the Contacts in the Rung are entirely unnecessary.

Stu....

AFI-ATI.jpg
 

Similar Topics

hello I have 7cp476 cpu why can led always open and No connection
Replies
1
Views
131
I have a program that I am gradually piecing together (my first program). There are 4 cascading timers that turn Y001 and Y001 + Y002 on and off...
Replies
8
Views
542
So I've been told time and time again that a PID (or PIDE) instruction should never be conditionally enabled/disabled and the only thing that...
Replies
7
Views
678
Found this online :hmmm: Kind of funny :) We use "Always Off" for Dummy Code to Monitor tags in the ladder to avoid [AFI]'s from throwing...
Replies
17
Views
2,991
It seems that the OPs always want to be secretive. Not just on this forum but also on reddit/control theory and especially on a Chinese forum we...
Replies
40
Views
9,873
Back
Top Bottom