Go to Post You should qualify the same way you eliminate if you ask me. - sircedric4 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2014, 13:23
TogetherSword8 TogetherSword8 is offline
Registered User
FRC #0888 (Robotiators)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Glenelg High School
Posts: 85
TogetherSword8 is an unknown quantity at this point
End of Match Command?

Our design for launching the ball involves a spring that we pull back, and then upon a piston release, accelerates the ball out.
Due to safety concerns of having a cocked spring with a lot of potential energy, we would prefer to let it release automatically at the end of a match. I remember reading something about running a single piston at the end of autonomous, is there a way we could do the same thing at the end of the teleop period, and if so, how would that be coded? We are a Labview team, but asking this in the general programming section for ideas on how to solve this.
__________________
I program a robot. Which means I write code and everyone gets mad at me when something doesn't work, even if I am the only one that knows it doesn't work. The key part to know is that the robot never works.
  #2   Spotlight this post!  
Unread 14-02-2014, 13:36
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: End of Match Command?

Quote:
Originally Posted by TogetherSword8 View Post
Our design for launching the ball involves a spring that we pull back, and then upon a piston release, accelerates the ball out.
Due to safety concerns of having a cocked spring with a lot of potential energy, we would prefer to let it release automatically at the end of a match. I remember reading something about running a single piston at the end of autonomous, is there a way we could do the same thing at the end of the teleop period, and if so, how would that be coded? We are a Labview team, but asking this in the general programming section for ideas on how to solve this.
Use a single-acting solenoid that defaults to being retracted. That way, the moment that the solenoid is no longer powered the energy will automatically be released. (Please note, I'm not saying that this is a good idea or that you should do this. The implications of being in the pit and having it suddenly discharge because you disconnected are pretty bad)
  #3   Spotlight this post!  
Unread 14-02-2014, 13:52
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 430
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: End of Match Command?

I haven't worked in Labview in a while, but the following should get you moving in the right direction:

Start a timer when your match state changes to teleoperated.

Determine how long before the end of the match you want your action performed.

When <teleop duration> - <current match time> is less than or equal to the time you want your action performed, then perform your action.

The comparison described above should result in a boolean value that you could use to run a commanded action in the same way you would use a boolean off of a joystick button. It could feed a CASE box. and your action to move the solenoid would be placed in the "True" area of the box.
__________________
http://team2168.org
  #4   Spotlight this post!  
Unread 14-02-2014, 14:08
DaveCT DaveCT is offline
Registered User
AKA: Dave Schroeder
FRC #0177 (Bobcats)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Connecticut
Posts: 9
DaveCT is an unknown quantity at this point
Re: End of Match Command?

In LabVIEW you can get the "TeleOp Elapsed Seconds" from the Match Info control input to the Teleop vi. Compare this with the expected match length - however long your mechanism needs.

As was mentioned I'd be very careful about how you implement this though, the consequence for an unexpected firing while troubleshooting in the pits could be severe. Last year it took over 2 minutes to fully charge our pneumatic system from empty. It was routine for the "auto hang" feature to trip while testing or charging. Something like a missile switch to enable/disable this functionality might help mitigate it, but wouldn't be fool proof.
__________________
Team 177 | Software Engineer
  #5   Spotlight this post!  
Unread 14-02-2014, 14:42
Pratik Kunapuli's Avatar
Pratik Kunapuli Pratik Kunapuli is offline
Probably browning-out on Astro-Turf
FRC #1648 (G3 Robotics)(EWCP)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Atlanta, GA
Posts: 143
Pratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to all
Re: End of Match Command?

Quote:
Originally Posted by eddie12390 View Post
Use a single-acting solenoid that defaults to being retracted. That way, the moment that the solenoid is no longer powered the energy will automatically be released. (Please note, I'm not saying that this is a good idea or that you should do this. The implications of being in the pit and having it suddenly discharge because you disconnected are pretty bad)
We've been doing this for a couple of years, and as long as everyone is a safe distance away from the robot and aware that the _______ actuates, then it should be fine. Last year we had our pneumatic 10 point hanger default to the down position so we could theoretically have a 0 second hang.
__________________
Official Driving Record: 101-59-0
2012-2015 Student 341 Miss Daisy
2015-Current Mentor 1648 G3 Robotics

Last edited by Pratik Kunapuli : 14-02-2014 at 14:49.
  #6   Spotlight this post!  
Unread 14-02-2014, 14:44
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,717
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: End of Match Command?

You could have a single actuating cylinder that actuates with no power that would just act as a latch on the catapult. That way nothing dangerous is firing when it loses power and its just locking the shooter in place if it is currently down.
  #7   Spotlight this post!  
Unread 14-02-2014, 15:03
Andy Brockway Andy Brockway is offline
Engineer
FRC #0716 (Who'sCTEKS)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Falls Village, CT
Posts: 459
Andy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond repute
Re: End of Match Command?

I am away from the programming computer but I beleive there is an IsTeleop and IsAutonomous that can be used in C++ for dropping out of loops. Possibly this could be used with single solenoid.
__________________
Andy Brockway
Team 716, The Who'sCTEKS
  #8   Spotlight this post!  
Unread 14-02-2014, 15:27
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: End of Match Command?

Anyone trying to do something similar with C++ or Java using DrvierStation.getMatchTime() should be aware of this bug: http://www.chiefdelphi.com/forums/sh...d.php?t=125495
  #9   Spotlight this post!  
Unread 14-02-2014, 15:34
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: End of Match Command?

If I were to implement a function like this, and safety in the pits was a concern, I would also use the isFMSAttached() boolean in my logic, which is a part of the driverstation class.

This should return true when connected to the fields network, but false when in the pits.

This way the auto actuation of the piston, only happens on the field.

They may be no way to test the code until your on the field, but I'd rather it not work on the field because of incorrect code, then accidently knock one of my kids out in the pits.

I know this method is available in C++/Java, I would assume something similar is availble in Labview if you unbundle the proper data structure.

Regards,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
  #10   Spotlight this post!  
Unread 14-02-2014, 16:31
DaveCT DaveCT is offline
Registered User
AKA: Dave Schroeder
FRC #0177 (Bobcats)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Connecticut
Posts: 9
DaveCT is an unknown quantity at this point
Re: End of Match Command?

Interesting, as far as I know there is no direct isFMSAttached equivalent provided in LabVIEW (and I've looked). Feel free to prove me wrong if I missed it somewhere.

However, looking at how it's implemented in Java it looks like we should be able to get it using something like the following:



I obviously haven't tested the above, so use at your own risk...
__________________
Team 177 | Software Engineer
  #11   Spotlight this post!  
Unread 14-02-2014, 16:53
jvriezen jvriezen is offline
Registered User
FRC #3184 (Burnsville Blaze)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Burnsville, MN
Posts: 636
jvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond repute
Re: End of Match Command?

For situations like this, it would be good to have some type of 'horn' (like a dump truck backing up) that would sound prior to the action to warn at least those familiar with the bot that something might be about to happen.

I'm thinking such a device would be good to put in the KoP with instructions to program it to squawk prior to potentially dangerous actions (at least when not connected to FMS-- i.e in pit, shop, demo, etc.)

Even better would be something that could also vocalize a fixed/programmed/recorded phrase : "Caution, stand back !"

Granted, programming errors may risk that you don't always get a warning, so you do run a risk of a false sense of security, but I think, on balance, such a system would be helpful, especially for games where there is high force actuators or harmful projectiles like frisbees.
__________________
John Vriezen
FRC, Mentor, Inspector #3184 2016- #4859 2015, #2530 2010-2014 FTC Mentor, Inspector #7152 2013-14
  #12   Spotlight this post!  
Unread 14-02-2014, 17:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: End of Match Command?

You are correct. LV doesn't have a wrapper VI for the IsFMSAttached. No good reason, probably oversight. But there hasn't been much call for it.

I believe the code you showed needs to index with a 3 instead of a 7.

Greg McKaskle
  #13   Spotlight this post!  
Unread 15-02-2014, 15:51
DaveCT DaveCT is offline
Registered User
AKA: Dave Schroeder
FRC #0177 (Bobcats)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Connecticut
Posts: 9
DaveCT is an unknown quantity at this point
Re: End of Match Command?

Quote:
Originally Posted by Greg McKaskle View Post
I believe the code you showed needs to index with a 3 instead of a 7.
You are of course correct, I missread the java define as 0x80 rather than 0x08. Thanks for the correction.
__________________
Team 177 | Software Engineer
Closed Thread


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 02:36.

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