Go to Post Let's Just say i am the one that gives Firefighters, paramedics, and law enforcement a job - Tytus Gerrish [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 12-10-2016, 17:18
ruralrobotics ruralrobotics is offline
Rawhide Robotics
FRC #5657 (Rawhide Robotics)
Team Role: Coach
 
Join Date: Feb 2015
Rookie Year: 2008
Location: United States
Posts: 10
ruralrobotics will become famous soon enoughruralrobotics will become famous soon enough
Safety Button for Firing Cannon

We have built a four barrel pneumatic t-shirt cannon this year in robotics class that we need to program. We can build buttons for each solenoid to fire but really what we want to do is have a safety button assigned for each barrel. Example: While holding button six down and pulling the trigger on the joystick cannon one goes off. Then release button six and press button five down while pulling the trigger to shoot cannon two. This will prevent any accidental firing of the cannons by accidentally hitting a button. Can anyone screen shot us how to build something like this? Any help would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-10-2016, 19:31
ahartnet's Avatar
ahartnet ahartnet is offline
Registered User
AKA: Andrew Hartnett
FRC #5414 (Pearadox)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2005
Location: Houston, Texas
Posts: 194
ahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant future
Re: Safety Button for Firing Cannon

Quote:
Originally Posted by ruralrobotics View Post
Example: While holding button six down and pulling the trigger on the joystick cannon one goes off. Then release button six and press button five down while pulling the trigger to shoot cannon two.
Just to clarify - all you want is to have to hit and hold two buttons down in order to fire - and in this case it would be the trigger?

There's lots of ways to implement this, but I would recommend this a structure like this:

Code:
if (trigger == 1):
{
   if (button1 == 1): fire cannon 1
   if (button2 == 1): fire cannon 2
   ..
} 
else
{ //do nothing }
Basically you just want a nested case (https://decibel.ni.com/content/docs/DOC-3507) Your top level case will be if the safety button (your trigger in your example) is selected, and your inner case will just be the logic for the joystick buttons to fire a cannon.

Note: I realize this is the labview forum and I gave written code example, but I don't have labview on this computer. If this doesn't help and no one else chimes in, I'll see if I can find a computer that has it installed to build up real quick.
__________________
Team 451 The Cat Attack, Student Alumni (2005)
Team 1646 Precision Guessworks, Mentor (2006-2008)
Team 2936 Gatorzillas, Mentor (2011-2014)
Team 5414 Pearadox, Mentor (2015-Present)

Last edited by ahartnet : 12-10-2016 at 19:36.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-10-2016, 15:50
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Safety Button for Firing Cannon

I think this is what you're looking for.

This code will only allow one solenoid to fire and both the fire and the cannon enable button must be pressed.

__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #4   Spotlight this post!  
Unread 17-10-2016, 21:22
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,974
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Safety Button for Firing Cannon

Regardless of which barrel is firing, don't be standing in front of ANY of them...
__________________

I am N2IRZ - What's your callsign?
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 02:32.

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