Go to Post Search is amazing. Give it a try. It's 10,000 lines of code that gets lonely if it's not played with often. - Brandon Martus [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2009, 19:25
csshakka csshakka is offline
Registered User
FRC #0818
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warren, MI
Posts: 21
csshakka is an unknown quantity at this point
Send a message via AIM to csshakka Send a message via MSN to csshakka
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2009, 21:19
FourPenguins's Avatar
FourPenguins FourPenguins is offline
Back in the Game
AKA: Ed Venator
FRC #2399
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Mount Olive, NJ
Posts: 261
FourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud ofFourPenguins has much to be proud of
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.
__________________
MORT 11
-2005 New Jersey Regional Chairman's Award Winner
-2006 Palmetto Regional Winner
-2007 New York Regional Delphi Driving Tomorrow's Technology Award
-2008 New Jersey Regional Finalist, Chesapeake Regional Winner, Championship Event Overall Top Seed
HB 2399
-2009 Buckeye Regional Delphi Driving Tomorrow's Technology Award, Pittsburgh Regional GM Industrial Design Award
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2009, 13:18
csshakka csshakka is offline
Registered User
FRC #0818
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warren, MI
Posts: 21
csshakka is an unknown quantity at this point
Send a message via AIM to csshakka Send a message via MSN to csshakka
Re: Autonomous help

Yeah this is what we want to do. I'll try it tomorrow once i get to robotics.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2009, 13:21
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
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)
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonomous Help GunfighterJ NI LabVIEW 2 10-02-2012 07:06
autonomous help jfrank Programming 8 08-02-2008 10:25
AUTONOMOUS HELP RDD Programming 2 12-02-2007 15:24
Autonomous Help sudeepr71 Programming 14 10-03-2004 22:14
Autonomous Help mightywombat Programming 11 07-01-2004 10:45


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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