|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#13
|
||||
|
||||
|
Re: Threading
here is a brief overview:
Code:
#include...
Task tsk("myTask",MyTask);//creates task "tsk" identified by the name "myTask" on the cRIO, calling function MyTask
//put variables to be accesed by the task and norm. code here
RobotDrive myRobot(1,2);
class ...
...
void Auto()
{
while (!tsk.IsReady())
{ }
tsk.Start(1);//start MyFunction on another thread w/ args (1);
while (IsAuto())
{
}
tsk.Stop();
}
...
...
};//end of class
void MyFunction (int arg1)
{
//code using arg1
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Threading on the CRIO | dpeterson3 | Programming | 4 | 01-04-2009 05:56 PM |
| Threading tool not working.... strange? | q_prof | Inventor | 3 | 02-20-2006 12:14 AM |
| Muti-threading | Ryan M. | Programming | 19 | 04-26-2004 09:10 AM |