Sign in to follow this  
Followers 0
Sleepy Wombat

Quick response from gurus please OSR etc

16 posts in this topic

quick question hoping for quick response If i use a OSR in my logic can i also refence that same bit anyware through the plc logic to get that some OSR bit to trigger a bit of code else where in the prog ??? ie Can i use OSR like below ?????

Share this post


Link to post
Share on other sites
I have not used it that way, but I believe you can use it that way. It makes sense to me. I reviewed the manual for the OSR instruction and cannot find anything that contradicts this. You should be able to use the output bit in following rungs in multiple places.

Share this post


Link to post
Share on other sites
Cool Ken...thanks for the response... The reason for the question is that is one way Omron can do it (Omron can also do a OSR, OSF directly on a bit also) and Mitsubishi does it that way. I am converting a program that was converted from Mitsubishi -> Omron -> noe to Allen Bradley Micro Logix 1500... Just a side note....IF you do use it in this way I suggest that you use symbols with descriptions etc that reflect how this bit is used, helps in faulting finding later... ie you would note that I use OSR or OSF in the symbol name....This is because in the AB software it does not reflect how you used the bit through the prog.

Share this post


Link to post
Share on other sites
This is it's intended use. How else can you use it?

Share this post


Link to post
Share on other sites
Use it as an input, i.e. inplace of XIC

Share this post


Link to post
Share on other sites
Hey fellas, I use one shots quite a bit but have never seen the need to use the OSR or OSF block. Instead I just use the ONS like this... ---| |------[ONS]------( )--- where the OTE is now only high for one scan. What's the practical difference between the OSR and and what I usually do?

Share this post


Link to post
Share on other sites
The inline ONS will trigger the first time the rung is true, including the first scan, so you cannot create a true OSF rung using inverted logic and the inline ONS instruction. However, the OSR and OSF storage bits are set during the prescan so that you don't get false triggers on the first scan. (Note that the inline ONS, and output OSR and OSF instructions are instructions for the PLC/5, Micrologix, and Logix5000 lines. The Sick500 only supporst an inline OSR instruction.) Edited by Alaric

Share this post


Link to post
Share on other sites
The difference is that you can use the OSR/OSF bit as a contact unlimited times in the program, while the ONS is local. Also, often you cannot put ONS wherever you need- it must be in a branch with an output instruction. Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
I have to point out (again) that I avoid the use of OSR. They are relatively pointless when you have to specify a bit for them to use (unlike Mitsubishi etc) and they can make it hard to track down bugs. I prefer to use: B3/0 B3/1 | ...---+--]/[----( )--+ | | | B3/0 | +---------( )--+ | where B3/1 is a one-shot or logic to be 'run once' ================================================== ... or with XIC instead of XIO, B3/0 B3/1 | ...---+--] [----( )--+ | | | B3/0 | +---------( )--+ | in conjuction with the following for detection of 3 states. | B3/0 +--]/[---... (false) | | B3/0 B3/1 +--] [----]/[---... (rising) | | B3/1 +--] [---... (risen) |

Share this post


Link to post
Share on other sites
Your statement is unclear. In any PLC you specify a bit for a pulse instruction, including Mitsubishi (e.g. PLS M0). Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
In Mitsubishi you put PLS M0 - M0 is the one-shot. In AB you put OSR B3/0 B3/1 - B3/1 is the one-shot and B3/0 is the state from the previous scan I believe Mitsubishi (I don't know) modifies the instruction in the actual program (Argh - nasty!) to remember the previous scan's state so you can't reuse code with a one-shot in it (it's been a long time since I used Mitsi so I may be a bit off there)

Share this post


Link to post
Share on other sites
But still what is wrong with this? Just do not use B3/0 anywhere else.

Share this post


Link to post
Share on other sites
I'm going to agree with Sergei. Spedley, what are you gaining by using your branched output code. Yes it serves the same purpose but if I was viewing a program, I would immediately recognize the the one shots. Your method I may recognize or I may not. I think it would cause confusion when troubleshooting. Just added it up and you are using the exact same amount of memory either way. What am I missing? Edited by TWControls

Share this post


Link to post
Share on other sites
Wildswing - ONS is fine but i also needed to use OSF - ie on the trailing edge... Sergei - OSR/OSF are quite useful...i emphase the point that your symbol should indicate their usage since in Mistubishi OR AB there is not indication of how the bit is triggered when used thoughout the program. OMRON do show a line in the referenced contact to indicate rise or fall ie ----|| |---- would me OSR or DIFU and ---| ||--- would be OSF or DIFD... In the newer CJ/CS/CP1H PLCs the bit can be differentiated directly and this is indicated with an arrow pointing up/down....In this case the same bit can also be used though the program in its none differentiated form...

Share this post


Link to post
Share on other sites
This is what I always do- just adding P sufix to the bit name.

Share this post


Link to post
Share on other sites
Spedley, this exactly mimics the ONS and OSR instructions. You can use the storage bit elsewhere in your program and know if you are rising or risen. If you know what you are doing you can also set/reset the storage bit elsewhere in your program to customize the one shot to your needs.

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