Go to Post Us, as adults, find ways to help the kids to make it happen. - aspiece [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 07-02-2009, 13:54
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: button Switch

I don't know how to use LabView (to me it's a waste of time) and I'm not involved with the programming on my team. However, you can still create a variable in labview (make it a boolean, an integer, a double, who cares). And then make it TRUE or 1 when you press the button and flip it each successive press. And then assign the motor value based on that.

-Paul
  #2   Spotlight this post!  
Unread 07-02-2009, 15:33
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,748
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: button Switch

To remember something from one time you process joystick data to the next you need to use either a shift register, a feedback node, a local variable, or a global variable. Any of these will work. Then you do to that storage what the code above showed. You sometimes flip it, and use its value to affect the motor speed.

Greg McKaskle
  #3   Spotlight this post!  
Unread 07-02-2009, 17:01
GunfighterJ's Avatar
GunfighterJ GunfighterJ is offline
Registered User
AKA: Joseph
FRC #2450 (RaiderBots)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Minnesota
Posts: 34
GunfighterJ is an unknown quantity at this point
Re: button Switch

I'm not sure exactly what to use but I think it would involve shift registers or select vi's
  #4   Spotlight this post!  
Unread 07-02-2009, 19:55
GunfighterJ's Avatar
GunfighterJ GunfighterJ is offline
Registered User
AKA: Joseph
FRC #2450 (RaiderBots)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Minnesota
Posts: 34
GunfighterJ is an unknown quantity at this point
Re: button Switch

I made a primitive toggle switch. But it will only activate/deactivate at a precise time. Probably like every millisecond or something. This is a picture of what we have. The only issue is the starting and stopping at the right time.
Attached Thumbnails
Click image for larger version

Name:	Toggle issue.PNG
Views:	98
Size:	8.2 KB
ID:	7356  
  #5   Spotlight this post!  
Unread 07-02-2009, 20:10
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: button Switch

You would use shift registers.

Create a false constant outside of your loop, and feed it to the shift register initializer, then have your joystick button feed the case indicator of a case structure. in the true case, put an inverter (NOT gate, on the Boolean tab), in the line, in the false case, just run it straight through. now feed that to the shift register output. tee the motor on/off into that wire now. I hope that made sense, I'd make a simple vi and show you, but i dont have LabVIEW on this pc.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
using a switch/button to turn on a motor smcmahon NI LabVIEW 3 26-01-2009 18:42
Push Button and Switch Suppliers for OI controls Goldberg204 Control System 8 11-01-2007 15:27
push-button switch on robot Conan Electrical 4 10-02-2006 22:03
Need Help Wiring Micro Switch/Limiting Switch Windward Electrical 2 07-02-2006 18:26
Button making Alex Burman Team Organization 7 10-10-2005 21:45


All times are GMT -5. The time now is 23:49.

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