One Shot Rising advise needed.

stevelawson

Member
Join Date
Feb 2004
Posts
115
Hi all.

I am having a little difficulty in getting my OSR working correctly, the problem being that i get more than 1 shot.

I am using an ADD function as the output of the OSR to place a integer value of 3 elsewhere in my program. When my OSR goes true it continues to ADD 3 for the length of time the input is true. Hence i end up with a much larger count than i need.

Just one other thing i need help with, and i feel rather stupid asking. I can't seem to import my rungs of logic into my posts so that you guys can see where i'm going wrong. I copy the rung but can't paste? Any ideas?

Many thanks Steve.
 
stevelawson said:
Hi all.

I am having a little difficulty in getting my OSR working correctly, the problem being that i get more than 1 shot.

I am using an ADD function as the output of the OSR to place a integer value of 3 elsewhere in my program. When my OSR goes true it continues to ADD 3 for the length of time the input is true. Hence i end up with a much larger count than i need.

Just one other thing i need help with, and i feel rather stupid asking. I can't seem to import my rungs of logic into my posts so that you guys can see where i'm going wrong. I copy the rung but can't paste? Any ideas?

Many thanks Steve.

check to make sure that the osr address(s) are not used more than once in the program (use the cross-reference feature).
 
I don't know if this going to work out, but i think i have attached a bitmap to this message. If it does , then when I:1/0 goes true i get several pulses on the OSR causing the value to jump to 9 or 12 instaed of 3.

This is all that is in the program at the minute, i just want to get it working properly like this before putting it with the rest of the logic.

There is also another line of logic underneath this, to reset the integer. I had to remove it because it said that the file was to large to import?
:A I: 1/1
:R N7:0

Many thanks.

Steve.
 
stevelawson said:
I don't know if this going to work out, but i think i have attached a bitmap to this message. If it does , then when I:1/0 goes true i get several pulses on the OSR causing the value to jump to 9 or 12 instaed of 3.

This is all that is in the program at the minute, i just want to get it working properly like this before putting it with the rest of the logic.

There is also another line of logic underneath this, to reset the integer. I had to remove it because it said that the file was to large to import?
:A I: 1/1
:R N7:0

Many thanks.

Steve.

If your input is a sensing device (prox, photo-eye) than there is some bounce in it when it detects an object. You could condition the input with a timer and then use the timer's done bit where you are using I:1/0 now.
 
How are you switching i:1/0 ? is it physical I/O ? if so , have you considered that you may have to debounce it a bit ? why not set up a temporary flag around the input so that you can simulate it - you know that your temp flag won't have any "bounce " , and you can make sure that your counter works properly (which it should )
You may also find that it is "nicer" to MOV 0 --> N7:0 for the reset aspect of you program - also , if accuracy is important then you want to AN I:1/1 in the counter logic to prevent the counter attempting to increment during the reset , then when the reset is removed , the counter will have a clean start - probably not necessary but just good practice - I would also tend top one shot the reset bit for the same reasons
If the physical input is connected to a PEC or a proxi , you may find it is giving a double shot for some reason .
 
Thanks lads, I'm sure that i can now move on with the help that you have all provided. This site is superb.

The problem that i am working on is the scrap counter in the Bottle line simulation in Logixpro-500.

I had some great help from "rsdoran" a couple of days ago which enabled me to get to this position. I am using a Bit array to activate the counts as the exercise suggests, but they stay true for a second or so causing the counts to multi-pulse.

I will try using a timer as suggested to get over this problem and will probably be able to do without the OSR.

Thanks.

Steve.
 
This may help with debouce a little: http://www.patchn.com/Debounce.htm
This process is with LogixPro and ProSIMII with this exercise: http://www.thelearningpit.com/lp/doc/bot/bottle.html, so not sure debounce is the issue. The OSR should be active for only one scan unless I(nput) goes off and on (alternates) for some reason; which should not happen with software UNLESS something intentionally causes it.

I have no idea what the line speed is for the bottling exercise or how often it will see 3 broken bottles, this could be settings in the process etc so may want to check that if it has alot of broken bottles and moving very fast, maybe slow the conveyor to minumum speed if possible.

I do not have LogixPro installed so not sure what each I/O address does, so I:1/0 could be sensing every bottle, check your addresses.

I have other thoughts, may have to install the software, not sure what you are doing this way, don't you need to count 3 small bottles then add 2 (small broken equal to 2/3 of 1 large), as done it looks like it will add 3 anytime it senses.

All this is just thoughts, maybe some part of it will help.
 
Sorry about this guys, but i'm still struggling. I have tried timers, flags, OSR, pulsing bits the lot, but i can,t stop the ADD instruction from over pulsing when the rung goes true.

Am i misunderstanding the use of a OSR. I assumed that once the rung went true it would pulse the ADD instruction only once on the rising edge and wouldn't pulse again until the OSR went false and then true again?

What i'm finding is that when the rung goes true, the ADD instructions Accumulator is getting several pulses, over-shooting the Preset value before going false no matter what kind of blocking i try.

Just to recap, what i want to do is, when my logic goes true to the ADD instruction i only want the preset value to be added to integer N7:0 no matter how long it stays true and not multiples of the preset. When the logic goes false and then true again, another preset value will be added to Integer N7:0


Hope someone can help, i'm getting tired now.

Steve.
 
stevelawson said:
Sorry about this guys, but i'm still struggling. I have tried timers, flags, OSR, pulsing bits the lot, but i can,t stop the ADD instruction from over pulsing when the rung goes true.

Am i misunderstanding the use of a OSR. I assumed that once the rung went true it would pulse the ADD instruction only once on the rising edge and wouldn't pulse again until the OSR went false and then true again?

What i'm finding is that when the rung goes true, the ADD instructions Accumulator is getting several pulses, over-shooting the Preset value before going false no matter what kind of blocking i try.

Just to recap, what i want to do is, when my logic goes true to the ADD instruction i only want the preset value to be added to integer N7:0 no matter how long it stays true and not multiples of the preset. When the logic goes false and then true again, another preset value will be added to Integer N7:0


Hope someone can help, i'm getting tired now.

Steve.

The above is the way a one-shot is supposed to work in a real PLC. My guess is your input is pulsing( as others have said). But there may be some
strange thing going on with LogixPro. Try rolling your own one-shot and see what happens.

OneShot.jpg
 
From your bitmap it looks like you are addressing a word in the OSR instruction instead of a bit. I'm not sure how it reacts if you use a whole word for the OSR instead of a bit.

Especially not sure in the Logix Pro simulator vs. RSLogix...
 
ndzied1 said:
From your bitmap it looks like you are addressing a word in the OSR instruction instead of a bit. I'm not sure how it reacts if you use a whole word for the OSR instead of a bit.

Especially not sure in the Logix Pro simulator vs. RSLogix...

Good catch, I missed that one as others I guess. That has to be the ansewer. (should be B3:0/0)
 
ndzied1 said:
From your bitmap it looks like you are addressing a word in the OSR instruction instead of a bit. I'm not sure how it reacts if you use a whole word for the OSR instead of a bit.

Especially not sure in the Logix Pro simulator vs. RSLogix...

Good eyes Norm, it should be something like B3:0/1. The OSR must be addressed to bit level, not sure what this could do but it appears RSLogizPro may be triggering all 16 bits in the binary file.
 
rsdoran said:
Good eyes Norm, it should be something like B3:0/1. The OSR must be addressed to bit level, not sure what this could do but it appears RSLogizPro may be triggering all 16 bits in the binary file.

I also wondered about doing a -------(r) to an N file as was shown in one of the posts , I didn't think you could .
 

Similar Topics

Hi Guys! I'm writing a Function Block and I want an internal counter to reset at the call of this FB. Now I have searched at it seems I can't...
Replies
7
Views
3,666
I am new with siemens which instruction is used as Rising Edge One Shot. |p|. I need whenever Rising edge is detect only execute instruction one...
Replies
1
Views
3,578
RSLogix 500 v9 OSR storage bit & output bit I am programming a sonic welding generator and I am stuck on an operation I need to perform and I'm...
Replies
3
Views
2,256
I am confused about descriptions people have posted on the web about a one shot rising instruction such as a rung with a NO contact which is a...
Replies
14
Views
10,175
Can you place one shot rising/falling pulse contacts using the IEC Dev v7 ladder editor (LDP, LDF Etc..)? If possible can someone tell me how...
Replies
2
Views
1,781
Back
Top Bottom