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
Old January 11th, 2018, 07:27 AM   #1
c_conroy
Member
Ireland

c_conroy is offline
 
Join Date: Jan 2018
Location: Munster
Posts: 3
One-second Pulse Generator

Very new to PLCs, I am trying to add a delay to a simple motor setup. I want the motor(just name I gave to output) to be able to go on for 5 seconds and then off for 5 again continuously. I've been given the hint to use a pulse generator. Which I been looking up online. However it isn't working like it should, taking far longer to pulse than I have designated and not resetting. Also the motor (output doesn't go high even when it's corresponding bit check is high).
  Reply With Quote
Old January 11th, 2018, 07:31 AM   #2
Logix_Stef
Member
United Kingdom

Logix_Stef is offline
 
Logix_Stef's Avatar
 
Join Date: Oct 2014
Location: Havant
Posts: 83
Hi c_conroy

Use two 5 seconds ON-DELAY timers switching each other on and off.
(Astable multivibrator)
  Reply With Quote
Old January 11th, 2018, 07:35 AM   #3
saultgeorge
Lifetime Supporting Member
United States

saultgeorge is offline
 
Join Date: Jul 2015
Location: Detroit
Posts: 132
Hi, welcome to the forum, and hope you will like doing programming.
This what you are wanting sounds suspiciously like a flasher routine, and a flasher routine would probably work. Just use a self resetting TON, using the .DN bit, and use a GRT instruction with 5 seconds .ACC in the GRT and then a preset of 10 seconds in the timer.
When the time accumulates to more than 5 seconds, the output will come true, and when it times out and resets, the output will be off for 5 seconds. Hope this will at least give you some ideas, anyway. What software are you using? A-B?
__________________
Detroit City Limit: An Automation Alley Community
  Reply With Quote
Old January 11th, 2018, 08:04 AM   #4
c_conroy
Member
Ireland

c_conroy is offline
 
Join Date: Jan 2018
Location: Munster
Posts: 3
Yeah I was basing it off a flasher I found online, seemed to fit what I wanted to do. Thanks for the advice I'll get at it now. I don't know why but my Timer doesn't seem to be resetting after the first 5 seconds. Using Studio 5000 on AB yes.
  Reply With Quote
Old January 11th, 2018, 08:10 AM   #5
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,384
Quote:
Originally Posted by c_conroy View Post
Yeah I was basing it off a flasher I found online, seemed to fit what I wanted to do. Thanks for the advice I'll get at it now. I don't know why but my Timer doesn't seem to be resetting after the first 5 seconds. Using Studio 5000 on AB yes.
Your timer will only reset if you tell it to....

You can either....

1. Put XIO Timer.DN in front of it... When it's done, it breaks the rung, and the timer resets, also resetting the .DN bit so that the timer restarts.

2. Put a RES instruction, driven by the Timer.DN bit
__________________
___________________________
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
Old January 11th, 2018, 08:56 AM   #6
c_conroy
Member
Ireland

c_conroy is offline
 
Join Date: Jan 2018
Location: Munster
Posts: 3
Thanks so much for the advice guys. Currently have the flasher routine working, turns out it wasn't faulty. Only problem seems to be that the accumulated value on my first timer on delay is going really high, even though I have the preset set at half a second. From the help contents I thought the accumulator was meant to reset once it reached the preset value. What have I missed that is causing this ?
  Reply With Quote
Old January 11th, 2018, 10:12 AM   #7
cardosocea
Member
United Kingdom

cardosocea is offline
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 1,027
Is this a Siemens PLC? If so look at the clock memory in the hardware setup. Basically a byte with bits pulsing at different frequencies.

If not, set a timer or timed task for whatever time base you want (100ms, 500ms or 1s) and increment an integer very time the timer expires or the task runs.

Use the bits in that Integer to pulse at whatever frequency you like.

It takes a little bit more work than a single timer, but you get as many frequencies as you would like in one go. This can be useful if the same PLC controls different areas and you want to differentiate between them or if you have the need to blink a light at different frequencies like for alarms or something like that.
  Reply With Quote
Old January 11th, 2018, 12:15 PM   #8
saultgeorge
Lifetime Supporting Member
United States

saultgeorge is offline
 
Join Date: Jul 2015
Location: Detroit
Posts: 132
If you want it off for a certain time and then on as per your post, then you can use a GRT instruction. For instance, you said 5 seconds on and 5 seconds off. So, set your timer preset (in the timer) to 10 seconds. Have an XIO done bit in front of the timer on the same rung. Put a branch, and put the GRT instruction in front of your OTE that you want to come on (Motor). In value "A" of the GRT, put in Whatever you named the timer and the subscript .ACC. In value "B" put in 5 seconds. When the timer reaches 5 seconds + then the GRT will come true, fire the OTE. When the timer times out, it will reset itself with the .DN bit changing state briefly, and the OTE will be off until 5 seconds accumulates again, etc. etc. Hope this helps. Good luck.
__________________
Detroit City Limit: An Automation Alley Community
  Reply With Quote
Old January 11th, 2018, 02:10 PM   #9
the_msp
Lifetime Supporting Member
United Kingdom

the_msp is offline
 
the_msp's Avatar
 
Join Date: May 2008
Location: Northern Ireland
Posts: 670
Are you using the TON instruction or RTO? Time's are in ms, not s, in logix/studio 5000
__________________
Regards,

Patrick

https://www.youtube.com/user/MrMatrixEngineering
  Reply With Quote
Old January 12th, 2018, 05:31 AM   #10
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,384
A bit off the wall, but this can be done with one instruction..

But you have to put this rung in a periodic task with a period of 5000 mSecs.

In my example I am using XOR to toggle bit 0 of my output module. Doing so does not affect the other bits in the module, so they can be used as normal....
Attached Images
File Type: jpg 2018-01-12_112913.jpg (29.7 KB, 76 views)
__________________
___________________________
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
Old January 12th, 2018, 02:19 PM   #11
CapinWinky
Member
United States

CapinWinky is offline
 
CapinWinky's Avatar
 
Join Date: Aug 2011
Location: Virginia
Posts: 505
In ST for most PLCs:

MyTimer.PT:= T#10s;
MyTimer.IN:= NOT(MyTimer.Q);
MyTimer();
Motor:= (MyTimer.ET > T#5s);


In ST for Rockwell:

MyTimer.Pre:= 10000;
MyTimer.TimerEnable:= 1;
MyTimer.Reset:= MyTimer.DN;
MyTimer();
Motor:= (MyTimer.ACC > 5000);
__________________
-----------------------------------------------------
Cycling power is a sign of weakness.
  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
1769-HSC Configuration for a Hand Pulse Generator Hammer71 LIVE PLC Questions And Answers 2 October 25th, 2016 04:54 PM
make a pulse generator for RSlogix500 duckman LIVE PLC Questions And Answers 5 March 10th, 2014 12:11 PM
Red Lion pulse generator help vin7102 LIVE PLC Questions And Answers 7 January 30th, 2013 10:40 PM
Ab Slc 1 Second Pulse Generator 69FIREBIRD LIVE PLC Questions And Answers 9 May 2nd, 2006 10:42 PM
pulse generator symbol TimothyMoulder LIVE PLC Questions And Answers 5 August 10th, 2005 10:51 PM


All times are GMT -5. The time now is 11:39 AM.


.