Go to Post FIRST competitions ARE holidays, or they should be at least. - Kel D [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2014, 21:05
Jarren Harkema's Avatar
Jarren Harkema Jarren Harkema is offline
Dancing Drive Coach
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Sep 2013
Rookie Year: 2013
Location: Michigan
Posts: 166
Jarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to all
Pulsing Solenoid

Hi everyone, Rookie team here. We are happy to say as of Saturday night we have a driving robot that can pick up balls and throw them. The way our intake and catapult mechanisms work, once the ball is picked up, the only way out is by our pneumatic catapult. Obviously we can open the solenoid to fire the catapult, but we really don't want to use that for passing. We would prefer a way to quickly pulse the solenoid, so as to just tip the catapult up, dumping the ball out. Looking around in the forums found little, but I do think I came to the conclusion that this code would have to be put into the Periodic Tasks VI.

(TL;DR, I want to pulse a solenoid on and off)

I don't have access to the robot at the moment to try this, but would this work? Is there a better way to do this? Am I just a crazy person? This code is in Periodic Tasks. The idea being that as long as the button is held down, the solenoid is turned on and off over and over again. Exact duration would change with experimenting.



Thanks,
Jarren
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2014, 21:20
Kevin Phan's Avatar
Kevin Phan Kevin Phan is offline
College Student
FRC #0357 (Royal Assault)
Team Role: Alumni
 
Join Date: Apr 2013
Rookie Year: 2010
Location: PA, United States
Posts: 95
Kevin Phan will become famous soon enoughKevin Phan will become famous soon enough
Re: Pulsing Solenoid

I do not see anything wrong with this code. Although the solenoid might not even launch due to the short time given. I understand you just want to pulse it, but I'm not sure about the timing.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2014, 21:56
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pulsing Solenoid

That's going to rapid fire the solenoid on and off until the driver's reaction time allows him/her to let go of the button.
I'd add code to fire only once per button press.

The second 10ms Wait isn't necessary.

We did something similar once before. I'll try to look up the solenoid reaction time.
I think I'd start with a longer period for the solenoid, so you start testing with it moving and proceed to slow it down until you reach the optimum time.
I seem to remember that it only starts twitching at around 6ms.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 02-02-2014 at 22:03.
Reply With Quote
  #4   Spotlight this post!  
Unread 03-02-2014, 12:40
mgerber's Avatar
mgerber mgerber is offline
Shoddy Programmer
AKA: Max Gerber
FRC #0223 (Xtreme Heat)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: New Jersey
Posts: 21
mgerber is on a distinguished road
Re: Pulsing Solenoid

We've been playing around with solenoid pulsing this year and Mark is right about the reaction time- Switching on/off for our Festo VUVG solenoid is 7ms/19ms. My understanding of it was that in order for the solenoid to turn on, you would have to send it a signal for at least 7ms, then once you stop sending the signal, it would take an additional 19ms to completely close.

In order to make the code run only once per button click you'd need to use rising edge detection. I'd refer to this thread.

I'll see if I can find some code to post.
Reply With Quote
  #5   Spotlight this post!  
Unread 03-02-2014, 22:51
Jarren Harkema's Avatar
Jarren Harkema Jarren Harkema is offline
Dancing Drive Coach
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Sep 2013
Rookie Year: 2013
Location: Michigan
Posts: 166
Jarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to all
Re: Pulsing Solenoid

Thanks all, definitely going to use the rising edge detection. I haven't looked into it to far, but whatever it is, the code I posted did not work. Will figure it out tomorrow.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-02-2014, 09:13
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Pulsing Solenoid

This code will execute only on the button press, this way your sequence doesn't keep repeating.



Credit goes to Team 358's website!
__________________
Per Audacia Ad Astra
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

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


All times are GMT -5. The time now is 20:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi