|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Dear CD,
I can't figure out for the life of me why I cannot see the third button case while seeing cases 1, 2, and 4? Please see pdf attachment. My next set of experiments will use Mark's example above but I really think my latching button method using RS Bistable vi should work. Thanks, 4 button Joystick Latch.pdf Last edited by marccenter : 07-02-2014 at 09:54. Reason: Update |
|
#2
|
||||||
|
||||||
|
Re: Using 4 joystick buttons with Case Statement
You still have the race condition that Mark pointed out. Putting the latches in a sequence helps some, but doesn't keep the case statement from executing before or after the sequence.
I think you can implement the whole thing using wires and feedback nodes, and then you would have no race conditions. As for any specific debugging, that's almost impossible to do with a PDF of a portion of the code, and hardly any description of what the code is supposed to do. Post the VI and a detailed description and maybe someone can help. To me, it looks overly complicated, but since I don't know what its supposed to do, I can't say for sure. |
|
#3
|
|||||
|
|||||
|
Re: Using 4 joystick buttons with Case Statement
There's an awful lot of complicated stuff going on there. I suspect LabVIEW provides a much simpler way to do what you want, but without knowing what you want to do, I don't want to risk giving inappropriate advice.
What exactly are you trying to do here? |
|
#4
|
||||
|
||||
|
Re: Using 4 joystick buttons with Case Statement
If you are looking to create a latch on a variable, you can use this method:
It works very well for us and it only updates the variable when something changes. We use this method for almost all inputs from the driver station. |
|
#5
|
|||||
|
|||||
|
Re: Using 4 joystick buttons with Case Statement
Quote:
When you convert a binary array to a number, each bit takes a power of 2 value. To get three, you'd need 1 and 2 simultaneously. |
|
#6
|
||||
|
||||
|
Re: Using 4 joystick buttons with Case Statement
Doc Wu,
That's it! I haven't tested it yet but I know that's the solution. When I get a chance, I will post the problem and solution for CD reference. Thanks, Last edited by marccenter : 12-02-2014 at 14:30. Reason: Update |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|