Chief Delphi

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

csshakka 02-14-2009 07:25 PM

Autonomous help
 
Our team was trying to make an autonomous function that would turn until a certain degree was measured by the gyro then move forward. Our problem is that were not sure how to get it to work well. We have a code that does this, but only reads the gyro every 1-2 seconds which would let the destined range be passed when spinning. How would we go about doing this so that the gyro gets a reading every tenth of a second, but running motors so that spin occurs at the same time until a specified range is reached?

FourPenguins 02-14-2009 09:19 PM

Re: Autonomous help
 
As I understand it, you want your sensor code and your motor code to be running at different frequencies (to check your sensors more often).
Have you tried using two while loops running in parallel? One of the nice things about labview is that you can run two loops at the same time. Just pass the angle variable into the motor loop. That way you can have the two loops running at different frequencies.

csshakka 02-15-2009 01:18 PM

Re: Autonomous help
 
Yeah this is what we want to do. I'll try it tomorrow once i get to robotics.

paulcd2000 02-15-2009 01:21 PM

Re: Autonomous help
 
you could also try putting the gyro code in the "timed tasks" section, and set the timer to 100 so it runs ten times per second (or some other number)


All times are GMT -5. The time now is 06:07 AM.

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