View Single Post
  #4   Spotlight this post!  
Unread 19-02-2010, 14:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
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: 2010 FRC LabVIEW framework architecture questions

Hi Greg,

Take a look at this post:

http://www.chiefdelphi.com/forums/sh...d.php?p=923860

What would be the proper way to set this up? Set up a "Periodic Task" running at 5ms (200Hz) to grab accelerometer data? I wonder how much code the VI would generate for this seemingly simple task? This task would obviously have to preempt Teleop execute in order to run properly.

I would think that the 5ms task would contain a ring buffer to hold the 10 samples, and that's all it would do (to keep it short).

Then, a 20ms task would grab a copy of the ring buffer and do the averaging and other calculations. Instead of a separate 20ms Periodic Task, should this be coded directly in Teleop execute?

What special precautions does the LabVIEW programmer need to take, to assure that the 5ms task is not writing data to the ring buffer while the 20ms task is attempting to read it? Or is that all handled automagically by the LabVIEW compiler and the RTOS?


~
Reply With Quote