Please Help Using One Shots

bryan372002

Member
Join Date
Apr 2005
Posts
72
I am trying to use a one shot instruction with allen bradley slc 500, and am not sure I am doing it correctly.

I put the OSR in the rung between my input (switch) and my output (light)and labeled it B3:3/1

I may can send a copy of the ladder if this isnt enough info.

thanks
 
What you have described is the following:
al825061.GIF

(If you are using a Micrologix 1100, 1200, or 1500 you must replace the OSR instruction with an ONS instruction.)

What the OSR instruction does is make the rung true for one scan only when you press first a button attached at input I:0/0. All subsequent scans will evaluate as false until the button is released and then pressed again. You can hold the button down for a year if you want, and the rung will still be true only for a split second when when the button was first pressed.

What does that mean to the rung you have described? It means that the output is probalby turning on for 1 or 2 milliseconds and then turning right back off. Far too fast for you to see with your eyes.

What exactly is it you are trying to do? We will be glad to tutor you through it but we don't do homework.




A quick breakdown on how the OSR instruction works.
Code:
If the rung is true before the OSR instruction then
	 If the OSR storage bit is 0 then
			 Set the OSR storage bit to 1
			Pass true
	 Else if the OSR storage bit is 1 then
			 pass false
Else if the rung is false before the OSR instruction then
	 Set the OSR storage bit to 0 
	 Pass False.
 
Last edited:
Thanks Alaric

thats about what I had concluded, yes this is pertaining to homework but I wouldnt want it done for me, but I have beat my head against the wall for to evenings trying to get this part right.....lol

here is what is wanted.

if input 1 and 2 are true then output 1 will be off and remain off until input 3 is turned on, output 1 will remain on after input 3 is turned off as long as input 1 aand 2 are true

I have tried using latch and unlatch instructions, and seal in circuits as well, the instructor hinted towards a one shot, and at the same time admitted this was butt kicking task....lol

any hints? Thanks again
 
This assignment is a word game as much as it is a programming problem. It is far easier to do than it sounds and the one shot will not help you.
 
This is not nearly as difficult as you think it is and I think that both you and your instructor are making it too difficult.

Lets look at it another way:
al825062.JPG

This is a drawing of a hardwired classic start/stop seal in circuit and it is very common in industrial control. This one has one start button with a normally open contact and two stop buttons with normally closed contacts. The initial conditon of the CR1 relay is off. The contacts of both of the stop buttons PB1 and PB2 are on as long as the buttons are not pressed. If the start button PB3 is pressed, CR1 turns on and remains on through its seal in contact even after the button PB3 is released. It will remain on as long as PB1 and PB2 are not pushed. As soon as either or both are pushed, the current in the wire is interrupted. Think of this as the wire becoming "not true."

You can solve this problem without any latches or one shots. Just try and replicate the circuit above in your ladder.
HINT: Replicate the logical function, not the state, of the buttons.

Lets see what you come up with and we'll help you out if need be or give you a pat on the back if you get it right.
 
Last edited:
Thanks Alaric

You are prolly right in the since that I am making it more difficult than it really is, and I will send a copy of what I have so far.

Yes I have used the common seal in circuit, but the trick is, when inputs 1 and 2 turn the light off, it has to stay off until input 3 is made, reagrdless of the state of inputs 1 and 2.

Ill post the whole scenario and what I have come up with.
 
here's what I have

ok here is the part of the project that are stumping me. there is actually 2 parts to this but the first part I have I think
  1. when inputs 1 and 2 are on then output 1 will be on and remain on after either input 1 or 2 are turned off. the only way to turn output 1 off after it is on is to turn input 3 on, if inputs 1, 2, and 3 are on then output 1 will be on. (this part I got)
  2. add a reverse switch to your program so that when it is true the program will work as follows.
when inputs 1 and 2 are turned on output 1 will be off and remain off until input 3 is made, output 1 will remain on after input 3 is turned off as long as inputs 1 and 2 are on.

Image6.jpg
 
Bryan,

Slow down a bit and talk it through…

Rung 0…Not the reverse switch….ok, now you come to your branch…look at both branches both have I:1/0 and I:1/1, then that leaves I:1/2 it is a XIO and XIC…this will negate each other…they will be null-in-void, there would be no reason to have the branch and no reason to have I:1/2

This would be the same as your rung 0

same.gif
 
my point is just take your time and talk yourself through it...you are doing the right thing, look at in that fashion, make your changes then repost your code...Try taking one statement at a time

"when inputs 1 and 2 are on then output 1 will be on"

do that, then add the next, so on, so on
 
Thanks again, I really appreciate any advice, Im fairly green at this, I have logix pro from learning pit. have been playing with that for a while and just started plc classes at a comm. college
anyway, with the reverse switch on if inputs 1 and 2 are made the light goes out, but it must stay out until input 3 is made, sooo if I use inputs 1 and 2 to unlatch the light, grrrr lol I think You are all right I have to slow down and make this make sense
 
Back again

Hey everyone, back to pester You all again....lol
in the second part of this problem I got to looking really hard and it never said that output one was on to start with, I guess its in how you read it.

when inputs 1 and 2 are turned on output 1 will be off and remain off until input 3 is made, output 1 will remain on after input 3 is turned off as long as inputs 1 and 2 are on.
so here is what I came up with rungs 3 and 4 is the second part
Image1.jpg



Now in the event that the output O:2/0 was suppose to be on at start up, can anyone suggest how I may accomplish this and keep the rest of rungs 3 and 4 working as they are.
 
Hints:

1. It can be done with 1 rung using a few XIC statements ( ---| |--- ) and an OTE statement ( ---( )--- )

2. The self latching idea is a winner. (I guess you could use an OSR statment, but that just leads to more rungs and more Rube Goldberg as far as I'm concerned -- I'd advise against it.)

3. You can use the state of an output like an input.


I:1/1 O:1/1
--+---| |---+----------------( )----
| |
| I:1/2 |
+---| |---+


O:1/1 O:1/2
-----| |----------------------( )----



This little example says:

Rung 1 - if either I:1/1 or I:1/2 is on, then O:1/1 will turn on.
Rung 2 - if O:1/1 is on, then turn on O:1/2.

It's a cheasy example, but it shows that output state can be used like an input.

Edit: Just realized I only addressed the part you have above this post in a quote, but not the other parts.
 
Last edited:
ALL of the above is WRONG...think about it.

Terry and Peter, it is strange, I understand if, then, else now.

I understand NOW why latches can be bad, not wrong, just improper in many cases.

Sorry for being so slow.
 
Last edited:

Similar Topics

After replacing the 70 with the 525, the PLC can read from the drive and recognizes it as online, but no commands are being listened to. PLC is...
Replies
1
Views
494
Q(1) Design a controlling system using DVP-40ES Delta PLC for a threestory Elevator Prototype as shown in the figure below. Show in details the...
Replies
4
Views
2,139
hi all! im having trouble with using masked equal. im on logixpro simulator at the moment. i have a screenshot for reference. please tell me why...
Replies
2
Views
2,617
Please help me, I have solve many week but still not solve it. I found trouble of factory talk studio when I set tag by browse address of OPC...
Replies
0
Views
80
Hello Everyone, i Have im my Industry a Endress & Hauser Promag400 this has a screen that constantly have that error, it says to wait, somebody...
Replies
2
Views
427
Back
Top Bottom