Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   check code (http://www.chiefdelphi.com/forums/showthread.php?t=82146)

Ziaholic 08-02-2010 23:35

Re: check code
 
1 Attachment(s)
You need to feed the Tank Drive with the default joystick inputs, unless overridden by the trigger. Your figure looks only half-fixed.

My attached pic doesn't directly apply to you, but if you look closely you can see where we used button 1 (trigger) to modify the throttle input. When the case is FALSE, we pass the normal value thru, but when the case is TRUE (i.e. the trigger is pulled), we override with a constant.

For us, the constant is 1.0 ... but if you want half power, then put a 0.5 in there and you've got it. (and we're doing our override to Axis3(Throttle), you'd want to do your case statement over the Y-Axis wires between the Joystick GET and the TankDrive VI.

G/L!

Vikesrock 08-02-2010 23:40

Re: check code
 
Quote:

Originally Posted by Ziaholic (Post 916159)
You need to feed the Tank Drive with the default joystick inputs, unless overridden by the trigger. Your figure looks only half-fixed.

The picture shows one true case and one false case (presumably to show an example of each case to assure things are coded properly)

Ziaholic 08-02-2010 23:54

Re: check code
 
KK ... sorry ... after re-looking at the pic in post #3, I can see what they're showing now ... My example does the uncluster outside of the case ... but essentially they're the same ... assuming that the other cases look like the ones that they're showing.

Hmmm.

Could it be that instead of writing "0.5" as the motor inputs when the trigger is pulled, they'd rather take the actual "Y" value, and cut it in half? If that's the case, then they should move the uncluster to the outside of the case statement, run both cases straight through, then modify the TRUE case with a MULTIPLY block with a 0.5 constant.


All times are GMT -5. The time now is 22:37.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi