View Single Post
  #5   Spotlight this post!  
Unread 21-03-2011, 16:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Tracking down a stuttering JAG/CAM drive.

I didn't mean to hammer you about efficency...
I apologize if it came through that way.
But I'm going to beat you up some more...

Actually the Compressor status call takes just as much time as the Start/Stop vi's, possibly longer since it will wait up to 100ms for the status from the other task before returning. This while it's being called from what's supposed to be a 20ms vi. The Start/Stop vi's return immediately.
I don't think the compressor part is a CPU issue. I think it's a sluggish loop issue. Anything longer then 100ms will trip the Safety vi's, which isn't a bad thing as it's notifying you that there's a timing problem.

You can probably move that LED to a slower periodic check. A quarter second is probably unnoticable to the driver.
If you want to get rid of the refnum altogether, even the use of global overhead, you can put the whole kit and kaboodle into Periodic Tasks.

Have you analyzed the CPU usage with the System Manager to help isolate the CPU hogs?
Have you tried using the Elapsed Time vi under Project Manager->Support Code to identify the loop piglets?

Can't comment on your other motor output calls.
Those could be due to other reasons, such as, an unrestrained loop that does make it a CPU drain.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-03-2011 at 17:12.
Reply With Quote