Go to Post FIRST is not the party- its the people. We can have a great competition no matter where we hold it. - Wayne C. [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 07-02-2013, 02:09
Martian86 Martian86 is offline
Registered User
FRC #1159
Team Role: Alumni
 
Join Date: Sep 2012
Rookie Year: 2011
Location: California
Posts: 28
Martian86 is just really niceMartian86 is just really niceMartian86 is just really niceMartian86 is just really niceMartian86 is just really nice
Problem programming buttons

We need buttons 1-4 on our game controller to set two different motors to the same speed when each button is pressed; each button is a different speed setting. Only one of them works properly for some reason (more on that in a minute), but the other three are identical as far as I can tell other than the button number and speed assignment.

The one that works:
Button 1--> Case structure: two true constants of -.67 and two false constants of 0-->WPIMotorControlSetOutput.vi (a separate one for each constant) --> WPIMotorControlRefNum Registry Get.vi (a separate one for each set output) -->motor names (since I lack creativity their names are "motor 1" and "motor 2")

The ones that don't work are exactly the same except the button numbers are different and the true constants in the case structure are different.

As I said, the button 1 programming works: it runs the motor at 2/3 speed. Buttons 2, 3, and 4 either don't work at all or make the motor twitch a little. Some of the things we've tried and what happened:
-Use different game controller: no difference
-Use different motor: no difference
-Use different PWMs: no difference
-Change speed in the button 1 code: button 1 sets motor to whatever speed we specified
-Disable code for buttons 3 and 4: button 1 still works and button 2 does not

At this point I'm not sure what I did, but I think I messed something up or accidentally deleted something, so I'm not too sure how credible this next piece of troubleshooting was; thankfully I had my pre-troubleshooting code saved elsewhere; I'll try it again tomorrow with that. Anyway, my next step:

-With buttons 3 and 4 still disabled, I changed the button assignment for the piece of code that we know works from button 1 to button 3. After this, none of the buttons worked.

Any ideas on what could be wrong? Thanks in advance for your input.

Last edited by Martian86 : 07-02-2013 at 02:15.
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:02.

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