View Single Post
  #2   Spotlight this post!  
Unread 06-02-2009, 14:22
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: Calling for dashboard...

You have a couple options. Possibly the simplest is to to put the info into the Status data which is transmitted at 50 Hz. If possible, drag the wires to a common location in your loop, format into an array of bytes, then call StatusDataCache with Set.

If the data is more scattered around, you can publish your loop data into one or more globals. Ideally, a unique global per loop. Then in one location such as in the Robot Main, you read the globals, format, and write to the status cache. Note that this is not very synchronized, just as the loop execution is not. For continuous processes such as driving the robot, this is probably good enough and it is easy. If you want to get more synchronized, you can look to use a functional global, queues, etc. For now, I'd keep it simple.

Another option is to skip the status data and go straight to the template for updating the actual DS data. The subVI is called Build Dashboard Data. In the subVI, it uses a typedef called Dashboard Datatype.ctl. You can add fields to this control, then decide how often you from your I/O or globals and publish it to the Dashboard. You can then modify the dashboard project to unbundle your new fields and display then however you like. An example of this would be to get rid of the low level AI values and publish something useful such as gyro heading or acceleration or position.

Greg McKaskle