View Single Post
  #5   Spotlight this post!  
Unread 07-03-2010, 21:24
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: How to automate between extending and retracting of cyinders

Quote:
Is the RTOS smart enough to reduce that task's time slice so as not to waste processing resources?
The LV loop and OS will do what the diagram requests. It is important for the programmer to insert a delay into the loop using a Wait or other notification node, or the loop will always need to run. The loop will then be scheduled by the OS along with all other active tasks.

As long as the number of globals used to trigger parallel tasks stays small and the polling rate is kept in check, I feel OK recommending their use, but they are certainly not the best notification mechanism. Once you are looking for something new to learn, feel free to look at the other notification mechanisms. The RT FIFO gives lots of control and is the more deterministic choice. Others include the Notifier, Semaphore, Rendezvous, Queue, and the Occurrence. These provide non-polling, more event-driven mechanisms to coordinate multiple tasks.

Greg McKaskle
Reply With Quote