Logix 5000: Question about OSR storage bits...

Russ

Lifetime Supporting Member
Join Date
Jun 2002
Location
Ohio.. Go Bucks!!!!
Posts
261
I was looking through code yesterday and found where someone used a OSR to initiate alarm notification.
However... the OSR occurs in a routine that is examined After the Alarm routine.

It looks like they used the storage bit to initiate the alarm notification since the one shot bit wouldn't be able to do it.


It seems wrong to me, and I think there's a concern about the storage bit value. I called Rockwell tech support and the tech said they'd never heard of anyone using the storage bit elsewhere in the logic.

Am I correct in being concerned about this? Some of the storage bits are used as xio and xic arguments throughout the logic.
 
The OSR instruction writes a 1 to the storage bit address when the logic preceding it is true, and it writes a 0 to the storage bit address when the logic preceding it is false. Nothing keeps you from reading the value of the storage address, and as long as you understand what it means then you can do whatever you want with that information.

If the universe just won't feel right to the OCD part of you (I have one of those parts) until its fixed to its satisfaction then put a branch in and place an OTE instruction in the branch and use that bit.
 
If the universe just won't feel right to the OCD part of you (I have one of those parts) until its fixed to its satisfaction then put a branch in and place an OTE instruction in the branch and use that bit.

I have one of those OCD parts too. Also, rather than add a branch+OTE, you could just duplicate the logic leading up to the OSR bit (often its just one or two instructions).

I agree that it's a questionable practice to reference those bits more than once no matter how perfectly valid it is...I just don't like it either..
 
I have one of those OCD parts too. Also, rather than add a branch+OTE, you could just duplicate the logic leading up to the OSR bit (often its just one or two instructions).

I agree that it's a questionable practice to reference those bits more than once no matter how perfectly valid it is...I just don't like it either..



LOL.. you guys are reading my mind. :)

I figured they were using it as an ote as a correction to the misapplication of the osr.
I haven't cross-referenced the storage bit array, so I'm not sure if there's any other manipulation that might be happening, which could impact the integrity of the logic.
The alarm code itself is fairly straight forward, but utilizing ote's instead of a one shot makes the latched bits unnecessary. I've notified the client of my findings, and have left it up to them as to how to proceed.
I just cross-referenced the storage array, and the logic looks at the value of the entire storage bit array,and interestingly enough also uses one of the bits in the array as an xic of of of the storage bits in an 'or' statement in the same rung.
It's an interesting usage, and yeah.... my ocd nerve twitches every time I see it, but I chalk it up to a misuse of the osr argument, and their compensation.
It's funny.. for the 'in shop horn' rung, they reference the value of the output bit array, and then in the same rung use an xic argument of one of the storage bits...
Interesting, very interesting.
 
Last edited:

Similar Topics

hi , I need to sorry for my bad English first. I'm newbie at plc programming ,I had been asked about E/IP protocol information for some system...
Replies
3
Views
388
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
907
Good morning guys, I have a machine that fills bags of prepared food at a variable speed, and a machine that checks the weight of the bag. What...
Replies
23
Views
6,856
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,776
Hey all, I just joined today. Not sure if this question is in the right place or if anyone has asked it before. I am monitoring a machine from...
Replies
2
Views
1,452
Back
Top Bottom