![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 | ||
|
Lifetime Supporting Member
|
RSLogix 5K - ONS vs OSR?
I'm trying to determine the difference in functionality of the One-Shot (ONS) vs the One-Shot Rising (OSR) instruction in RSLogix5k.
When I set up both in a test program, they seems to achieve the same result, ONS taking up only one rung where OSR will require two. See attached image. The instuctions are described as the following: Quote:
Quote:
Can anyone explain? Thanks! |
||
|
|
|
#2 |
|
Lifetime Supporting Member + Moderator
|
The 'one rung' versus 'two rungs' is an 'apples to oranges' comparison. A more valid one is your rung 0 without the OTL instruction to rung number 1. Both produce a bit (test10 and test14 respectively) which will be on for one scan.
The ONS instruction is more compact if the one-shot effect is needed for that rung only (to set a latch in your example). Both are similar if the needed effect is to produce the one-scan on bit and use the same number of bits. They're just in different positions on the rung.
__________________
Controlling outputs is the PLC's way of getting its inputs to change. www.thePLCguy.com |
|
|
|
#3 |
|
Lifetime Supporting Member
|
Thanks for the reply.
In the example the OTL on Rung 0 does not output to Rung 1, they are different bits. I was manually toggling the test bit on Rung 0 and seeing if that would affect the OTL on that rung in the same way as the OSR on 1 was affecting the OTL on Rung 2; basically Rung 0 and Rungs 1-2 are separate form one another. Sorry, it was a quick and sloppy routine I threw toegether to play around with. So besides being on different positions on the rung, how would they be used differently? I guess I am wondering if there are any situatations where I would want the one over the other? Sorry if this might seem like an overly basic question, but I'm pretty new PLC programming. Thanks again. |
|
|
|
#4 |
|
Lifetime Supporting Member + Moderator
|
It's really just a matter of programming preference. Just remember the effect of each instruction.
I'm thinking that the presence of two instructions with virtually the same effect comes from the various previous type processors (the PLC2/5 family and the SLC/Micrologix family) and the ways they provided this function. The ONS instruction is the more intuitive to me. The part of the rung after this instruction will be true only on the rising edge of the logic before this instruction. The OSR instruction is just a box and, except for the name, doesn't give as visually obvious clue as to its effect - the second bit of this instruction will be true only on the rising edge of the logic into this box. If a continuation of the one-shot output is not needed beyond the current rung then the ONS is the more obvious choice. It can be used, as in your rung 0 example, to do something immediately (set a Latch). But that 'rising edge on' logic output is not available past this rung. To make it so you need to add a bit which then makes it functionally equivalent to the OSR. I standardized on the OSR just for continutity.
__________________
Controlling outputs is the PLC's way of getting its inputs to change. www.thePLCguy.com |
|
|
|
#5 |
|
Lifetime Supporting Member
|
That makes much more sense now. Thanks!
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rockwell Allen Bradley Programming Software, RSLogix 5, RSLogix 500, RS Linx, RSLogix | vvcd | LIVE PLC Questions And Answers | 21 | September 24th, 2009 10:04 PM |
| RSLogix 5000 V15 Features | Samneggs | LIVE PLC Questions And Answers | 18 | April 20th, 2006 05:45 PM |
| Latching One shots? | sportster | LIVE PLC Questions And Answers | 25 | October 10th, 2005 08:36 AM |
| Cascading ONS and OSR instruction | ettikudiappan | LIVE PLC Questions And Answers | 5 | January 30th, 2003 03:14 AM |
| Cascading ONS and OSR instruction | ettikudiappan | LIVE PLC Questions And Answers | 1 | January 29th, 2003 02:02 PM |