What is a one shot ?

This post is almost 8 years old
I think you were searching one shots too
haha


and Im sure he has them figured out by now
 
I'm not offended

That's ok if the post if old... if you read my comment, I clearly stated that I'm only replying so that "Newbies who stumble upon this question can also have an answer".

And I was google searching for ways to do a one-shot using only basic logic units, like generic coils/contacts... that's how I originally found this thread. Not because I have any ambiguity about how a basic PLC component works...



The function block diagram routines of GE's Proficy Machine Edition don't allow transitional coils to be used WITHIN the FBD so I had to get creative yesterday and do the logic without using the right components.
 
I usually use a oneshot to latch a bit that I want to stay on after conditions are met.
Then I unlatch the bit...…….or turn it off when other conditions have happened. for example you want to turn on a conveyor when a photo eye is blocked and want the product delivered to the end of the conveyor when a prox detects the drag chain is at the exit.
 
I have been around industrial automation for 24 years and I cannot believe that I still don't fully understand a "One Shot".

I find it hard to believe that after programming PLC's for 24 years, you've never understood the value or importance of a One-Shot. It's not an esoteric high-level concept like Modbus or communication protocols.

Let me guess, after 24 years, you've also never managed to understand the function of SET or RESET coils either? I only presume because one-shots are essential in the proper functionality of SET and RESETs. Perhaps you meant you have been programming for 2.4 years? Still considerably longer than I've been a controls engineer, and I'm not still fumbling with the basics. For someone who takes their skills or profession seriously, it's an embarrassment of an admission to not know this essential functionality, and you probably should have tried Google before throwing up your hands in defeat on this forum and wasting the time of others..

Not everyone that posts questions to this forum is a PLC guru, PLC programmer or Controls Systems Engineer... Maybe it's just "Bubba" the maintenance guy needing some guidance/understanding on what the programming is for their equipment to help them maintain/troubleshoot the system.
 
Not everyone that posts questions to this forum is a PLC guru, PLC programmer or Controls Systems Engineer... Maybe it's just "Bubba" the maintenance guy needing some guidance/understanding on what the programming is for their equipment to help them maintain/troubleshoot the system.


Fair enough... perhaps I read the original poster's question too quickly and thought he said he was a programmer for 24 years. Admittedly I may have been overzealous in my response.

My apologies to the original poster.
 
I actually enjoy similar discussion but then again, I'm weird.

Language can reflect so much about one's cultural background and that's for programming language as well.

In the world of human language, there are language out there that doesn't have the words for left or right. On this island, for example, one distinguish between the left and right by saying the one that's near the ocean vs the one near the mountain, for example. People who grows up speaking that language would never feel the lack of "left/right" but most of us would feel that language is just not "right".
 
I'm surprised that nobody mentioned one shot electromechanical relays. Then again, I'm old.

A one shot (AKA single shot) relay can create a pulse output with a variable time duration. This could be useful for having a control relay mimic the operation of a pushbutton, for instance, as in a pump control via both pushbutton and level switches.

The one shot relay typically receives power at all times, and has an "initialize" input that triggers the pulsed contact closure. Once the relay has been triggered, the initialize input must transition off and then on again in order to trigger another pulse.
 
I find it hard to believe that after programming PLC's for 24 years, you've never understood the value or importance of a One-Shot. It's not an esoteric high-level concept like Modbus or communication protocols.

Let me guess, after 24 years, you've also never managed to understand the function of SET or RESET coils either? I only presume because one-shots are essential in the proper functionality of SET and RESETs. Perhaps you meant you have been programming for 2.4 years? Still considerably longer than I've been a controls engineer, and I'm not still fumbling with the basics. For someone who takes their skills or profession seriously, it's an embarrassment of an admission to not know this essential functionality, and you probably should have tried Google before throwing up your hands in defeat on this forum and wasting the time of others.

Regardless, although you receive no compassion from me for your laziness, I will still provide an answer to your post as their may be noobie amateurs who will stumble across the same question, and THEY deserve an answer (inexperience is an excuse I can accept):

One-shots are essential any time you have logic where you want to output a single action based on conditions which need to be met, but when you don't necessarily want to HOLD that output true the entire time the conditions solve:

"Debounce" for holding a pushbutton down is a good example (as another commentor mentioned, you could have a pushbutton held down for 100 PLC scans, and you wouldn't want to register 100 presses for each time that rung evaluates).

A practical application I implemented just yesterday involved putting a valve state in either AUTO or MANUAL. The operator can switch between AUTO and MANUAL at his command, but they also wanted the valve to automatically switch to AUTO based on certain conditions. If I did not use a one-shot for this logic, the rung would HOLD the valve in AUTO the entire time the conditions were true, and therefore the operator would be unable to put the valve back into manual. Therefore, a one-shot was appropriate because you want to initiate the change in state, but not maintain that state forever.


If it still doesn't make sense to you, there are some great jobs in the Amazon delivery field of work these days! 24 years is far too long to struggle with a simple concept. If nobody around you is telling you to change your profession, then I am your only true friend.

Seems like you are holding back a little. Tell how you really feel.

This is the type of guy that gives programmers a bad name.

Jeez, So much for there being no dumb questions.
 
"Debounce" for holding a pushbutton down is a good example (as another commentor mentioned, you could have a pushbutton held down for 100 PLC scans, and you wouldn't want to register 100 presses for each time that rung evaluates).

That's not what debounce is. Oneshots do nothing for debounce.

I'm not still fumbling with the basics.

3cb71w.jpg
 
Last edited:
....semantics...

Perhaps "Debounce" was not the right word to use to describe the process of "ignoring subsequent false reads after your intended read" but it's pretty damn close, and there's no word to perfectly describe the nature of holding an input TRUE for multiple scans but only wanting to read the state once. Debounce is literally the closest word you can get to such an action, so you're just being an *******... where at least I was trying to help the guy.

Additionally, debounce logic would require the use of a transition state (one-shot) to start the timer, i.e. you would want to ignore additional reads for .4 seconds AFTER your FIRST GOOD READ meaning .4 seconds from the START of your value being received. If you don't use a one-shot to set a bit when your data is first read, and time-up based on the conditions alone, your timer will reset continuously and debounce logic won't function. So to use debounce code you actually need one-shots as well (with a combination of SET/RESET).



At the end of the day, I may have potentially misued a word but that's not to say that my message was incorrect. And thanks for bringing up another great example for the original poster to learn from.
 

Similar Topics

Hello all. This is a very lonnnnnnng shot but worth a try. I have an OMS Group Impact100 metering machine. At this customer it blows foam into 3d...
Replies
0
Views
169
Howdy Everyone, So I have been retrofitting a cell to run different fixtures and updating it with new drives and a few other things. It runs...
Replies
15
Views
1,463
Hi all, I am working on a ladder program in AS and I was to trigger a reading on my IO link sensor every .5 s, and use that value to run a...
Replies
1
Views
520
Hello Everybody, Someone must be familiar with Horner Cscape, I wrote a program on a overhead door with a 3 button station,I'm working on a...
Replies
2
Views
1,388
personally I don't care about golf - but this is one impressive shot ... if it weren't on tape, I wouldn't have believed it ... the first video in...
Replies
1
Views
1,491
Back
Top Bottom