Quote:
Originally Posted by cdizzle
Wait, so if I set my motor speed to 0 when false in the case block for button 3, will it affect the motor when the button 4 case block is true?
|
Quote:
Originally Posted by nicholsjj
No it should just affect the output from case three. My next question is are you sending both button outputs into the same motor set output vi. This might be where Kevin's statement about overriding can occur if you use two different vi's.
|
If you have two completely separate case blocks for button 3 and 4, then yes, the false case in the button 3 block will affect button 4 even if button 4 is true. See my attached snippet. The top two show the cases in the case blocks. The bottom shows what will run when button 3 is false and button 4 is true. Both of those case blocks will run, which means you're trying to set the motor speed to 0 and set the motor speed to 0.9 at the same time. The results of trying to set the motor to two different speeds simultaneously are not particularly predictable.
Cecil's suggestion of putting the motor set block outside of the cases is also a good one. Then you know that you only have one motor set and it's only going to run once. Then you just have to figure out how to send it the appropriate value. It makes it pretty obvious if your value selection method isn't valid because you'll end up trying to wire two thing to the same input, which labview will complain about.