Help - Search - Members - Calendar
Full Version: Quick response from gurus please OSR etc
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
Sleepy Wombat
quick question hoping for quick response thumbsupsmileyanim.gif

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 ??? brainbulb.gif

ie Can i use OSR like below ?????
Ken Moore
QUOTE(Sleepy Wombat @ May 18 2006, 04:12 PM) [snapback]34052[/snapback]
quick question hoping for quick response thumbsupsmileyanim.gif

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 ??? brainbulb.gif

ie Can i use OSR like below ?????


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.
Sleepy Wombat
Cool Ken...thanks for the response... graduated.gif

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.
Sergei Troizky
QUOTE(Sleepy Wombat @ May 18 2006, 04:12 PM) [snapback]34052[/snapback]

Can i use OSR like below ?????


This is it's intended use. How else can you use it?
Spedley
QUOTE(Sergei Troizky @ May 19 2006, 02:52 PM) [snapback]34133[/snapback]
QUOTE(Sleepy Wombat @ May 18 2006, 04:12 PM) [snapback]34052[/snapback]

Can i use OSR like below ?????


This is it's intended use. How else can you use it?


Use it as an input, i.e. inplace of XIC
wildswing
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?
Alaric
QUOTE(wildswing @ May 19 2006, 01:58 PM) [snapback]34162[/snapback]
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?


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.)
Sergei Troizky
QUOTE(wildswing @ May 19 2006, 01:58 PM) [snapback]34162[/snapback]
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?


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.
Spedley
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:
CODE
        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)
|


Sergei Troizky
QUOTE(Spedley @ May 20 2006, 09:47 AM) [snapback]34218[/snapback]
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.


Your statement is unclear. In any PLC you specify a bit for a pulse instruction, including Mitsubishi (e.g. PLS M0).
Spedley
QUOTE(Sergei Troizky @ May 20 2006, 04:10 PM) [snapback]34221[/snapback]
QUOTE(Spedley @ May 20 2006, 09:47 AM) [snapback]34218[/snapback]
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.


Your statement is unclear. In any PLC you specify a bit for a pulse instruction, including Mitsubishi (e.g. PLS M0).


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)
Sergei Troizky
QUOTE(Spedley @ May 20 2006, 11:39 AM) [snapback]34223[/snapback]


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

But still what is wrong with this?
Just do not use B3/0 anywhere else.
TWControls
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? shrug.gif
Sleepy Wombat
Wildswing - ONS is fine but i also needed to use OSF - ie on the trailing edge...

Sergei -
QUOTE
This is it's intended use. How else can you use it?
The code that i posted was my own and i just wanted confirmation on its usage because the AB manual i was using only gave a decription, and not an example....

Speedley -
QUOTE
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.

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...
Sergei Troizky
QUOTE(Sleepy Wombat @ May 20 2006, 08:22 PM) [snapback]34266[/snapback]
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.


This is what I always do- just adding P sufix to the bit name.
Alaric
QUOTE(Spedley @ May 20 2006, 09:47 AM) [snapback]34218[/snapback]
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:
CODE
        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)
|




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.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.