Sign in to follow this  
Followers 0
ToddM

Always on/off bits

31 posts in this topic

Hi Folks...I know this has probably been addressed before sometime or other, but I searched and didn't find it. What is the purpose of an "always on or always off " bit at the beginning of PLC ladder logic? I've seen it in some and not seen it in others. I have noticed in most code it is not located any where else in the code but at the 1st rung. I've seen it in Omron, AB, mitsubishi, and Siemens. Just curious. Thanks and later...Todd

Share this post


Link to post
Share on other sites
A place holder used for comments ( descriptions) about the program. " This program is for the control of traffic lights at 5th and Main Street" Or debugging or future troubleshooting.

Share this post


Link to post
Share on other sites
In Omron you can't connect a function directly to the busbar (some exceptions like IL/ILC/END/...) So if you want a function being executed all the time (for instance a scaling) you us ethe allways on bit in front of it.

Share this post


Link to post
Share on other sites
In traditional ladder you put in an always false bit logic on the first rung, so that it will be false for the rest of the ladder scan. Then the always false bit can be used to disable, or enable logic (typically for start ups).

Share this post


Link to post
Share on other sites
I use the always on bit in front of EVERY rung. There are 2 reasons 1) If I wish to turn off the rung I just put a slash through the bit for the rung. 2) If I wish to add a contact in the line for the rung I just add it and do noit have to re-draw all the darn logic, drawing down lines, deleting horizontal lines etc. Just makes life a heck of a lot easier when online and commissioning a job. I am predominantly an Omron user by the way.

Share this post


Link to post
Share on other sites
Some models of PLCs require that a rung always be started with a Load instruction. In these PLCs you have no choice but to have an always on and always off bit if you want to program unconditional rungs, as you must have some state, either 1 or 0, to load into the stack. I don't think its a particularly good design, but it is what it is. Thats one of my gripes about Omron. Displaying and entering a rung as text helps with that, but its a pain to switch back and forth.

Share this post


Link to post
Share on other sites
one word of caution from the "worry-wart" department ... just because the "always off" bit is UNlatched (etc.) at the beginning of every scan is NOT an iron-clad guarantee that it will ALWAYS be off ... specifically, a fat-fingered typographical error can "hijack" the control of the bit part way through the ladder - and give the bit an "ON" status for the remainder of the scan ... in this - as in all things PLC related - a reasonable dose of caution is required ... I know of at least one programmer who habitually uses an XIC XIO combination (both addressing the same bit) to insure that the logic will always test "false" ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Some of my customers have this as troubleshooting bit. If you are testing some new logic you take it out of the rung, try out your logic. If the logic doesn't work right or you need to temporarily disable it, put the "always off" bit back in. It also makes it easy to search for rungs that are being debugged. They did not allow AFI instructions in their Rockwell programs and also had other brands of PLC's with the AFI instruction.

Share this post


Link to post
Share on other sites
Hey Ron could you explain this statement a little further. I've never heard of an always off bit being turned on in any way. Thanks

Share this post


Link to post
Share on other sites
I think that this is what Ron is talking about. Even if you have an uncondition OTU or some other method of keeping the bit from being on, someone can accidentally enter a 1 in the wrong address and turn the bit on until the program scan comes back to your condition that turns the bit off. In this case rung 0 would turn on the output where rung 1 would not. At least this is my take on what Ron said. I've been thinking about Ron's post since I read it the first time. I currently use the rung 0 approach in controller that don't have an AFI instruction and am wondering if I should change my approach

Share this post


Link to post
Share on other sites
OK, I understand your example. Do you have to define your own Always On/Off bits with AB?? I know the Omron PLC's that I use have "built in" bits (CF113, CF114) and I don't think they can be accidentally turned on or even forced on, but I'm not sure so I'll have to try it next time I'm online.

Share this post


Link to post
Share on other sites
In the older PLC5 and the newer Logix 5000 platform controllers, you have an AFI(Always False Input) and a NOP(No Operation) instructions which do the same thing. But the SLCs and the Micrologixs have a more limited instruction array which doesn't include these Oh and happy birthday ECSI

Share this post


Link to post
Share on other sites
Mitsubitshi PLC's have desginated always on and always off bits as well. I prefer to make my own so I can control toggle them on and off. I will create tempoary timers this way to test various actions a process is taking. I will use the same timer over and over so I do not have to reconfigure the PLC. I know Ron is going to tell me this is a bad thing to do and he is right but when I am in a hurry (production equipment) it is a down and dirty trick to see what is going on.

Share this post


Link to post
Share on other sites
You are correct, in the Omron PLC the always on and always off bits cannot be accidentally altered. If you attempt to program an output coil addressed to CF113 or CF114 you will get an error message and the program won't compile.

Share this post


Link to post
Share on other sites
from Clay B. ... don’t be too surprised ... sometimes Ron does things like this too ... there’s nothing really “wrong” with it - just as long as you’re careful ... it’s sort of like using I/O forces and other techniques along the same lines ... many things that we do COULD BE dangerous if we get sloppy ... but IF (big IF) you keep your head “in the game” some of these techniques can be very helpful ... and in case I didn’t make it clear, I was talking only about Allen-Bradley systems in my earlier post above ... I have ZERO experience with the other processors that you guys have mentioned that have built-in “ALWAYS OFF” and “ALWAYS ON” bits ... and in case anyone wants to dig deeper into this subject, click here for an earlier thread along the same lines ... (man, has it actually been almost five years since I wrote that stuff?) ...

Share this post


Link to post
Share on other sites
Thanks TW....44 years ago today the world became a better place...LOL. My wife may disagree though!

Share this post


Link to post
Share on other sites
Greetings fcflores1 ... the downside of what you’ve posted suffers from the same possibility of a “hijack” situation partway through the program that I brought up earlier ... yes, what you’ve set up on the first rung of the program will definitely put a “0” status into bit B3/0 at THE BEGINNING of each scan ... but ... suppose that someday you (or someone else) happens to accidentally program in some new logic PARTWAY down through the ladder ... if that logic happens to “turn on” bit B3/0, then any XIC references to your “ALWAYS OFF” bit throughout the rest of the scan will suddenly begin to test “TRUE” - rather than testing “FALSE” as you originally intended ... in some cases this unexpected “TRUE” operation of the “ALWAYS OFF” bit could be quite “bad” ... now as long as nothing happens to disturb the status of B3/0, all will be well ... all I’m saying is that there is the potential for a very unpleasant situation if everyone isn’t careful ... of course there is ALWAYS the potential for a very unpleasant situation in EVERYTHING that we do if everyone isn’t careful... that having been said, this is just one more thing to worry about (if you're the "worrying" kind) - or at least something else to keep an eye on ... as with many things, “not knowing” is the biggest danger ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Hi folks... TW , is there a reason you use an output instead of a binary bit in your example? And thanks everyone for the replys, this is good stuff to know. Later...Todd

Share this post


Link to post
Share on other sites
SOR XIC B3/0 XIO B3/0 OTE B3/0 EOR is really no different than the much simpler unconditional unlatch. SOR OTU B3/0 EOR And as Ron pointed out, either is subject to a change of state later on in the program. With SLC processors you can of course create a new 1 word bit file and make it static. You however are still responsible for the initial state of the bits in that word when offline, but they won't get accidentally changed while you are online, or through an HMI, or through some mistake in your ladder logic. Personally, I don't see the need for a programmed always on/off bit in an AB PLC. As mentioned earlier some PLCs like Omron & Mistubishi, (and IIRC, Idec - I haven't touched one in years though) will not let you program an unconditonal rung, you must have something to LOD (load) to the stack to start a rung. But in an AB PLC this is not a requirement. After debugging a program, I never leave behind the debugging code, and when I do need a bit that I can toggle for the purposes of testing, I pick an unused bit from the data table that is not controlled by the program, that way I can set the bit state to whatever I require without modifiying a rung. Leaving behind user programmed always on and always off bits just seems a bit untidy to me.

Share this post


Link to post
Share on other sites
We use the XIO and XIC in series but I also have these bits always on at the beginning. We use a trick from Rockwell's Drives group. We use our initials as the symbol or tag name for these bits. Then we can search for them and know who installed them.

Share this post


Link to post
Share on other sites
Hi Folks...Alaric wrote.. This is what I've always done in the past, usually I pick the last available bit in the table so if I have to install a bit for some reason or other it will be the next available bit and I won't step on my own toes. Later...Todd

Share this post


Link to post
Share on other sites
Hi guys, I had used the Always on and Always off bits (These are read only system bits) in a GE Fanuc project last year. There was a PID block, ready made for use in either of Direct mode or reverse mode. At several instances, where a chemical process reactor there was heating required at certain reaction steps and then cooling required during certain other steps. In this case, a particular input bit on the PID block was switched Off for heating steps and correspondingly turned on for steps involving cooling. In other instances, reactors would be used exclusively for heating or exclusively for cooling. In such cases, the PID block's Direct/reverse selection bit would be explicitly kept on or off in the desired way, so that only the desired mode will work. Though there are other ways of acheiving this functionality, I found using the #Always_On and #Always_off bits a usefully intutive and secure way of Configuring PID blocks. Hope my experience with this issue proves useful to others... Raj S. Iyer

Share this post


Link to post
Share on other sites
Over the years I have tried a few methods of inserting on/off bits in front of rungs so that I could turn the individual rungs on and off. I have used internal bits and this causes problems as you need to use a differnet bit in front of each rung to stop inadvertent turning on and off other rungs. Pain in the tail. The lovely thing about the always on bit in Omron PLCs is that by just putting a slash through it disables only the rung in question. No other rungs are affected. In effect, I turn the always on bit in the affected rung into an always off bit for that rung only. Sometimes handy having to put a LD in front of every rung as opposed to not having to.

Share this post


Link to post
Share on other sites
Just a quick observation... noticed this with AB... Why do they use terms like XIC Examine If Closed and XIO Examine If Open OR as noted above AFI(Always False Input) this last one epscially made me chuckle.... a bit jinglish to me,,, I always have preferred the terms Normally Open / Normally Closed... why.. well i don;t go arround buying 4XIO Aux Contacts for my contactors...its 4 NO contacts and Always On.. Always Off Is their a reason ... do they need 3 letter acronims in their instructions ? just curious..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0