Usage of OSR in SLC5/03

AB2005

Member
Join Date
Nov 2006
Location
Lahore
Posts
318
Dear All,



Is it necessary to use OSR in the rung of counter after input instruction? Someone told to me that the counter may self count (accumulate) continuously without using OSR if input instruction is true.
 
A SLC 500 counter is a transtional instruction. It only upcounts when the rung transitions from false to true.

You can make it count continuously by unlatching the .CU bit.
 
Greetings AB2005 ...



this is one of those “simple” questions that turns out to be “not-so-simple” after all ...



the original question:



Is it necessary to use OSR in the rung of counter after input instruction?




the correct answer is: “yes, sometimes it is necessary” - but not for the reason that you stated ...



Someone told to me that the counter may self count (accumulate) continuously without using OSR if input instruction is true.



no, the counter won’t accumulate continuously if you leave out the OSR ... AS LONG AS you don’t do something weird to the CU (Count Up) bit (as my distinguished colleague Alaric mentioned) ... or maybe program two or more CTUs with the same address ... etc. ... just post again and ask if you’d like more information along these lines ...



but the “too simple” answer to your question is that “no, you usually don’t need an OSR in front of the CTU instruction” ...



now let’s go deeper - for the “not-so-simple” answer ...



question (1): are you eventually going to want to “reset” this counter back to zero? ... let’s suppose that your answer is “yes” ...



question (2): are you going to use an RES (Reset) instruction to do the reset? ... let’s suppose that your answer is “yes” ...



question (3): is there a chance that the field input condition (switch, sensor, etc.) just happens to be made/true/on/active while you execute the RES instruction? ... let’s suppose that your answer is “yes” ...



question (4): would it “mess things up” if you happened to get a “false count” of 1 immediately after you finished executing the reset? ... let’s suppose that your answer is “yes” ...



well if you answered “yes” to each of those questions, then in that case, you WOULD want to insert the OSR in front of your CTU instruction ...



click here to read all about this particular subject ... it would probably be a good idea to read the entire thread - but the nugget of truth that you desire is included in Post #15 which I’ve linked above ... skip ahead to the rung comments in the last figure of that post if you want to get right to the point ...



I hope this helps ...
 
Last edited:
Thanks for a lengthy and good answer.



you’re welcome ... but actually ALL of the answers that you received were “good” ones - and all could certainly be considered “correct” ... my “overkill” answer just tried to go one step further than the others ...



let’s just sum it all up by saying that in MOST cases the OSR is not necessary ... but in SOME cases it is very helpful to have one ...



in programming (as with life in general) your mileage may vary ... and one size does not fit all ...
 

Similar Topics

Hey if anyone can please tell me how OSR can be used in the Logixpro? I've got a problem in bottleline simulation. when the bottle reaches a...
Replies
0
Views
3,404
I had always thought that you weren't supposed to use the bit for an OSR instruction elswhere in a program. Then I'm reading AB's manual for the...
Replies
2
Views
5,466
Hello everyone! This is my first time posting, though I have been to this site a few times hunting for some random problem like we all do. I...
Replies
4
Views
156
Hi everyone I am using Winproladder software for programming FATEK FBs PLCs and in programming, we often use Timers for activation of the...
Replies
4
Views
557
Anybody have any experience using a tone generator on analog signal wires? Trying to locate two analog level sensors in an old plc5 panel that...
Replies
7
Views
989
Back
Top Bottom