View Full Version : Using OSR storage bit for XIC?

July 28th, 2017, 01:47 PM
Hi folks, first post so be kind.

I'm adding a vision inspection system to a toggle press and in the toggle press program they are using an OSR storage bit as an XIC in two other rungs later in the main LAD2 program. I'm not sure how effective this is, and I suspect it has to do with the light curtain.

I just wanted to know everyone's thoughts on this, thanks.

July 28th, 2017, 02:15 PM
This is from the Instruction Help in RSLogix5000:


When true and the storage bit is false, the OSR sets the output bit to true. When true and the storage bit is true, the OSR clears the output bit to false. When false, the ONS clears the storage bit and the output bit to false."

The Output Bit and the Storage Bit are not the same (they will have different states, the Output Bit can be false when the Storage Bit is true).

I've never seen this done before but I don't think you can just replace the Storage Bit XIC with the Output Bit in the logic, I would try to test the logic a few times to see if you can understand why this was done.

July 28th, 2017, 02:38 PM
It looks like they are piggybacking off the OSR so they don't have to write to a seperate bit. Has to do with the light curtain mostly.

It turns out that I was able to fix my problem, and that I had caused it. I piggybacked the vision system permissive stuff on old prox sensor code, but I shouldn't have added it into the setup mode. I couldn't get the machine to run in setup without having a part in place. Whoops.

Got it all squared away now. Thanks!

James Mcquade
July 28th, 2017, 02:45 PM
What brand PLC?

if ab, it won't work 100% of the time.
I accidently had 2 osr bits of the same (B3/21) for example in a slc 500.
rarely worked, found the error and made a second osr bit and all is well, machine hasn't stopped yet.

just my experience.

July 28th, 2017, 03:06 PM
It's an AB Mircologix 1000. They One Shot just about every command in the program, and even ones they didn't they took the input and stored it as a bit, then XIC the bit for the output.

I can see that it's a good thing, to keep the contacts from bouncing, but then they pulled some OSR storage bits as XIC inputs and didn't label them.

July 28th, 2017, 04:41 PM
I think this falls under "being too tricky for your own good". The storage bit for a OSR follows the status of the rung up to the OSR. But you should probably insert an OTE and use XIC and XIO off that address instead. The original author was "saving an OTE".

July 28th, 2017, 05:12 PM
It's an AB Mircologix 1000


A ML1000's "OSR" instruction does not have a storage bit.

The ML1000 like the SLC500 series of controllers only have the "OSR" instruction which is just like the "ONS" instruction in other controllers.

The "OSR" instruction in the ML1100,1200,1400, and 1500 do have an "OSR" instruction which does have a storage bit.

Post your .rss file if you can ( zip it first).

July 31st, 2017, 05:15 AM
Here ya go Mickey

July 31st, 2017, 06:39 AM
It's a 1500. That explains it.

July 31st, 2017, 07:21 AM
It's a 1500. That explains it.

Yep sorry, I was thinking of another PLC when I said it was a ML1000.