View Single Post
  #4   Spotlight this post!  
Unread 11-02-2012, 18:25
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Benefits of "Periodic Tasks VI"?

Quote:
Originally Posted by CRLS97 View Post
In our teams code the bulk of our code is in Periodic Tasks.vi However in our Teleop.vi code I'm having the robot read a digital input and a global data so we have a couple different ways of controlling the robot. Could this be causing our -44601 error? I can actually notice a significant lag (like half a second) between a joystick movement and the robot movement and it's somewhat annoying while we're testing. I even tried having both periodic tasks and vision disabled and the error remained...
I can't give an example in LabVIEW because I don't have it installed here, but here's a skeletal pseudo-C code:

Code:
while (1) {

if (!run_me) {sleep(20ms); continue;}

run_me= false;

doSomething;

sleep(250ms);

doSomethingElse;
}
The global boolean "run_me" tells the task to run once.

Notice the "sleep(20ms)" which prevents the task from chewing up an undue amount of CPU time.