Go to Post From what I've seen in FIRST, teams that copy generally always learn something from it, and if they don't, the copy they produce is of much lower quality than the original. - TheOtherGuy [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
  #4   Spotlight this post!  
Unread 11-02-2009, 18:06
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: Button Help

The latest picture doesn't make it clear which joystick is being read, especially for the top portion.

Anyway, as mentioned before, you really have four possible combinations, three of which you have to define.
Neither button pressed -- motor off (128 for value I guess).
Only J1 pressed -- motor one direction (255)
Only J2 pressed -- motor other direction (0)
Both J1 and J2 pressed -- ??? (may I suggest motor off)

Keep in mind that when you set a motor speed/power, it stays at that setting until you change it. So if you never set it to 128, your motor never stops.

There are many ways to write the logic once you decide what you want. The important thing to do is to walk through your code for each of the above combinations and determine what the result is -- does it match your desired outcome. If it gets too complicated or doesn't seem to do what you want, use probes to verify all your assumptions.

Greg McKaskle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Joystick Button Motor!!! HELP!!! furiousgeorge Programming 3 07-02-2009 22:57
Joystick Button Programming in Labview Help Needed domoarigato NI LabVIEW 11 28-01-2009 10:55
Button making Alex Burman Team Organization 7 10-10-2005 21:45
Button Programing BobcatProgramer Programming 6 25-02-2004 16:43
Button types Scottie2Hottie General Forum 7 27-03-2002 00:13


All times are GMT -5. The time now is 01:04.

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