Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Setting motor output based on gyro angle (http://www.chiefdelphi.com/forums/showthread.php?t=101146)

DominickC 25-01-2012 20:54

Setting motor output based on gyro angle
 
Hello -

Here's the logic behind what I want to do. Note that all of this code is within a while loop inside Periodic Tasks.vi. I want to use the rangefinder and gyro to help one of the drivers shoot.

I want to get the distance from the rangefinder, and if it falls between a certain range, make a case structure true. Within this structure, I can then press button 1 on a joystick to make the next case structure true. Within this next case structure, I'm getting the Gyro angle and seeing if it falls within a range of angles. If it's false, I want to set the motor output of a motor to 0.25 until the angle falls within a range of angles. Download the VI to see what I've drafted.

Do you think this will do what I want it to do?

Thanks.

DominickC 25-01-2012 21:11

Re: Setting motor output based on gyro angle
 
1 Attachment(s)
New attempt. I think this one is cleaner and is easier to read. See attached VI.


All times are GMT -5. The time now is 11:31.

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