View Single Post
  #3   Spotlight this post!  
Unread 04-01-2009, 11:51
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: Threading on the CRIO

Are you using labview or C++? As I understand, the "dataflow execution" model in labview means that to do multithreading you just make two dataflow things and don't connect them. In c++, it's a bit more complicated, but I think the "programming user's guide" has some stuff on how to do it.


For what you're talking about, however, you don't even really need to use all the fancy multithreading features. Instead, you can just set up a loop in your program like:


1.Get data from DS
2.Make whatever calculations you need for traction control, etc
3.Set your speed controllers
4.Get and analyze data from the camera
5.Set your panning servos
6.Repeat
__________________
Get yer robot source code here!