Go to Post To the best engineers, scientists, and thinkers, something that is "hard" isn't something to avoid; it is something that begs for us to prove that we can do it. STEM is built on the very idea of trying something, failing, and trying something different. - Bryan Herbst [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-03-2013, 13:00
cisasteelersfan cisasteelersfan is offline
Registered User
FRC #0222
 
Join Date: Nov 2012
Location: Tunkhannock
Posts: 1
cisasteelersfan is an unknown quantity at this point
Run a series of instructions when button is pressed

Hi all,
I'm trying to figure out how to 'automate' our shooting process. Currently in teleop we simply have a button wired to a solenoid: true means forward, and reverse means back.

When a button is held down, we want the solenoid to go forward and back four times in a certain amount of time.

What I've tried is putting a global variable that is true when the button is pressed. This gets passed to periodic tasks where if true, it runs a for loop four times. This outputs to another global variable that is passed to teleop that controls the solenoid (forward or reverse).

It doesn't work as programmed. Does anybody have any ideas? I considered putting an autonomous-style loop in teleop, but is that the optimal solution?

Any suggestions are greatly appreciated!
Reply With Quote
 


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 12:08.

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