You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
Thread Tools Display Modes
Unread November 22nd, 2011, 03:17 PM   #1
Rob S.
Member
United States

Rob S. is offline
 
Join Date: Sep 2008
Location: Maryland
Posts: 683
Dog What is a one shot ?

I have been around industrial automation for 24 years and I cannot believe that I still don't fully understand a "One Shot". Could someone explain that to me , and also an example of a "Real World" situation .

Thanks , in advance. Have a great Thanksgiving.
  Reply With Quote
Unread November 22nd, 2011, 03:27 PM   #2
Helliana
Member
United States

Helliana is offline
 
Join Date: Nov 2011
Location: Louisiana
Posts: 644
Other users can correct me if i'm wrong, but its my understanding that the way a one shot functions operate is if the logic before the OSR is TRUE, the output after the OSR is true for only one scan cycle. The logic before the OSR must then go false and then back to true before the output goes high again.

From the RSLogix500 help file: "An example would be to use the OSR to freeze rapidly displayed LED values."
  Reply With Quote
Unread November 22nd, 2011, 03:31 PM   #3
Clay B.
Lifetime Supporting Member
United States

Clay B. is offline
 
Clay B.'s Avatar
 
Join Date: Jun 2005
Location: Concord,NC
Posts: 1,304
A one shot is a bit that stays true for only one PLC scan.

Now you can have different types of One Shots depending on what PLC you use but they all basically work the same in that they are only true for 1 PLC scan. The conditions previous to the one shot bit have to change states again to trigger the one shot again.

A real world use for a one shot would be a function you needed to do once when a certain condition is met no matter how long that condition is true.

Good example: You wanted a time stamp everytime some on pressed a button. Teh one shot would be in series with the button and trigger a move comand that moved the current time into the time stmp memory area.
  Reply With Quote
Unread November 22nd, 2011, 03:33 PM   #4
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,738
What this guy had and fluffed it
Attached Images
File Type: jpg os.JPG (19.2 KB, 943 views)
  Reply With Quote
Unread November 22nd, 2011, 03:35 PM   #5
bce123
Lifetime Supporting Member
United States

bce123 is offline
 
bce123's Avatar
 
Join Date: Feb 2011
Location: texas
Posts: 1,177
A one shot is when your making online changes to a 10 millon dollar process. you most likely will only get one shot!!!! LOL
__________________
"You can teach a dog to sit and lie down but then he justs gets lazy"
  Reply With Quote
Unread November 22nd, 2011, 05:09 PM   #6
RussB
Lifetime Supporting Member
United States

RussB is offline
 
RussB's Avatar
 
Join Date: Oct 2003
Location: Michigan
Posts: 2,910
There are three simple types, depending on the platform you are working on and how the control implements it or the programmer programs it.
1. Where a bit is turned ON from the initiating rung until the end of logic, then it goes back OFF.
2. Where a bit is ON from the initiating rung until the rung above it, then it goes back OFF.
3. Where a bit is turned ON from the initiating rung, then held ON until this scan completes and for the next complete scan.

Number 2 is the most common today.
__________________
LEARN something today so you can TEACH something tomorrow.
DETAIL in your question promotes DETAIL in my answer.
Dominus Vobiscum <))>(
"Where is the wisdom that we have lost in knowledge?" T.S. Elliot


  Reply With Quote
Unread November 22nd, 2011, 05:20 PM   #7
Sergei Troizky
Member
Canada

Sergei Troizky is offline
 
Join Date: Oct 2004
Location: Montreal
Posts: 711
One shot condition or output should be On from initiating instruction execution and until the latter is executed (scanned) again.
It should have nothing with the controller scan, as it may be executed in non-cyclic fragment of code (subroutine, interrupt, or subject to bypass by jump).
All controllers I've worked with, operate exactly this way.
  Reply With Quote
Unread November 22nd, 2011, 05:31 PM   #8
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,608
You asked for a practical example of the use of a one-shot - see pic.

Same input - two add intructions which increment the count....

I only made Sensor true once....and Count1, Count2 were both zero before.

One-Shot truth-table is another way to explain it....

Input Output
0 0 any scan
1 1 any scan
1 0 subsequent scans
0 0 any scan


If you want more explanation than has already been given, feel free to ask.
Attached Images
File Type: jpg 2011-11-22_222909.jpg (25.8 KB, 870 views)
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem



Last edited by daba; November 22nd, 2011 at 05:38 PM.
  Reply With Quote
Unread November 22nd, 2011, 11:46 PM   #9
CLP_5K
Member
United States

CLP_5K is offline
 
Join Date: Nov 2011
Location: Under the same sun
Posts: 2
and MUST be on the last instruction of a rung before any output instructions.
  Reply With Quote
Unread November 23rd, 2011, 01:02 AM   #10
iant
Lifetime Supporting Member + Moderator
Australia

iant is offline
 
iant's Avatar
 
Join Date: May 2002
Location: Melbourne
Posts: 3,668
it does vary from PLC to PLC
ONS - One shot fires as a pulse Once apon the logic before it becoming true.
OSR - OSF - is a little bit different
Can be reffered to as DIFF(UP) DIFF(DN)
OSR fires a single pulse on the Logic Rising from Bit 0 to Logic 1
OSF Fires a single Pulse on the Logic Falling from Bit 1 to Logic 0
__________________

Give all the answers
- People seldom learn.

Guide People to the posibilities
- Their Answers will come easily.
- Their Knowledge will grow.

They will then teach others

Regards
Ian Trost
  Reply With Quote
Unread November 23rd, 2011, 04:41 AM   #11
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,608
Quote:
Originally Posted by CLP_5K View Post
and MUST be on the last instruction of a rung before any output instructions.
You are incorrect : the opposite is true - You are free to place a ONS instruction ANYWHERE on a rung - even inside branches, except that it CANNOT be the last instruction on the rung

I think you are confusing ONS with OSR and OSF, which are output type instructions and must be the last instruction on a rung - EXCEPT in the case of Logix5000, which does not have that restriction.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Unread November 23rd, 2011, 04:49 AM   #12
uptown47
Lifetime Supporting Member
United Kingdom

uptown47 is offline
 
Join Date: Feb 2008
Location: Over there, next to those boxes
Posts: 1,142
If you wanted to increment a count every time someone pressed a button then you could use a one-shot to prevent the count incrementing on every scan while the button was pressed.

ie. Operator presses button. System scans maybe 100 times in the duration it takes for the operator to release the button. You don't want your count to increment by 100 every time - only once. Hence you put a 'one shot' in series with the button so that the system only acknowledges the 'rising edge' of the button and then ignores it until the button is released and pressed again.

;-)
  Reply With Quote
Unread November 23rd, 2011, 07:23 AM   #13
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,608
Quote:
Originally Posted by uptown47 View Post
If you wanted to increment a count every time someone pressed a button then you could use a one-shot to prevent the count incrementing on every scan while the button was pressed.

ie. Operator presses button. System scans maybe 100 times in the duration it takes for the operator to release the button. You don't want your count to increment by 100 every time - only once. Hence you put a 'one shot' in series with the button so that the system only acknowledges the 'rising edge' of the button and then ignores it until the button is released and pressed again.

;-)
Quite correct - although an integer count is usually handled by using a Counter CTU or CTD instruction, which automatically has "rising edge" detection, or "false-to-true transition" as RA like to call it.

I used "Add 1" in my example above just to demonstrate the principle of the one-shot, but if I really wanted to "add 1", I would most-times use a counter.

However, if I wanted to add 2 numbers together, storing the total back in one of the sources, I would most certainly have to use a one-shot to prevent the add occurring on every scan while the rung is true.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Unread November 23rd, 2011, 08:03 AM   #14
uptown47
Lifetime Supporting Member
United Kingdom

uptown47 is offline
 
Join Date: Feb 2008
Location: Over there, next to those boxes
Posts: 1,142
Quote:
Originally Posted by daba View Post
Quite correct - although an integer count is usually handled by using a Counter CTU or CTD instruction, which automatically has "rising edge" detection, or "false-to-true transition" as RA like to call it.
Very good point.

I tend to use an 'ADD' for a lot of my counts though as I find the 999 maximum counter value a limitation for a lot of what I'm doing.

;-)
  Reply With Quote
Unread November 23rd, 2011, 11:02 AM   #15
Mickey
Lifetime Supporting Member
United States

Mickey is offline
 
Mickey's Avatar
 
Join Date: May 2003
Location: Palmdale,Ca
Posts: 10,256
Quote:
I tend to use an 'ADD' for a lot of my counts though as I find the 999 maximum counter value a limitation for a lot of what I'm doing.
HMMM? AB counters will go to 32767.
__________________
Mickey

If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-getmarried. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.
----- Chinese Proverb
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Die casting machine servo valve shot control russrmartin LIVE PLC Questions And Answers 3 May 14th, 2009 01:09 PM
DL330 psuedo one shot pulse Caledonian LIVE PLC Questions And Answers 2 May 12th, 2009 05:56 PM
One shot request roggowb LIVE PLC Questions And Answers 2 April 21st, 2009 10:49 AM
different types of one shot plc noob LIVE PLC Questions And Answers 2 October 31st, 2007 11:29 AM
one shot cdmac LIVE PLC Questions And Answers 3 October 15th, 2002 09:02 PM


All times are GMT -5. The time now is 06:50 AM.


.