|
Re: PROGRAMMING HELP PLEASE !
I think that you are encountering a problem because you are referencing the motor power three times with different 'set speed' VIs and are hitting some sort of race condition.
One thing that is not obvious is that the case statement can accept numeric inputs as well as Boolean inputs.
An 'easy' way to make a case statement that takes multiple booleans and does different things when they are set is to make a case statement and build an array of your booleans using 'build array'.
You can then wire the boolean array to "boolean array to number' operator and wire the output of that to your case statement.
Then you just need to use boolean math and put a motor speed value in each case.
00=0 -> (FF= case 0)
01=1 -> (FT= case 1)
10=2 -> (TF= case 2)
11=3 -> (TT= case 3)
So there you have 4 different values with two boolean inputs and you can just use one "motor set speed" vi.
Hope this is clear I don't have labview available at the moment or I'd take a screen shot.
Regards,
Sten
|