|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Button Programming Error?
I'm trying to rewrite the code for our robot in Labview, but I'm not exactly if the code I wrote will deply correctly. I want to use buttons 1 and 2 from both joysticks....were using tank drive...i think its correct, but i just want to double check....thanks!
|
|
#2
|
||||
|
||||
|
Re: Button Programming Error?
Rather than opening the motors repeatedly for each case, I would instead have a single Open Motor for each outside of the loop and a single Set Speed for each within the loop, and simply have the speed values as the case selects.
Instead of doing 2 seperate cases structures for identical motors, also just use an Or operator on the selector input for the button inputs. Last edited by Cuse : 03-04-2009 at 14:53. Reason: Added modified VI |
|
#3
|
|||
|
|||
|
Re: Button Programming Error?
with the "or" statement that got put in, wont that tell the program that when either Button1(x) or Button2(y), they both do the same function?
What I'm trying to ask is how does the program tell the difference...is x always "true" and y always "false"? thanks |
|
#4
|
||||
|
||||
|
Re: Button Programming Error?
Oh, my apologies, I misread the original code, I thought both motors were set to 1 for all button cases.
Code has been modified, hopefully this works out for you. |
|
#5
|
|||
|
|||
|
Re: Button Programming Error?
how would i go about changing this code to use digital input buttons instead of the joystick buttons? do you use dig in and arrays?
|
|
#6
|
||||
|
||||
|
Re: Button Programming Error?
You would use a GetDigIn VI, convert the array to a cluster, and then use whichever inputs you'd like for your cases.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Button Programming: Is this right? | greatman05 | NI LabVIEW | 12 | 13-02-2009 16:02 |
| Programming a joystick button... | programmr | Programming | 2 | 05-01-2009 16:13 |
| button programming | joesmomh00haha | Programming | 12 | 10-02-2007 10:36 |
| Joystick Button programming | Bharat Nain | Programming | 5 | 18-02-2005 11:48 |
| Arm Rotation (1 Button Programming!!) | Joelster | Technical Discussion | 1 | 14-02-2002 13:15 |