Go to Post I come to Chief Delphi to get away from the mundane, everyday news. It's part of what makes the forum appealing to me. If I want to read world news, I'll go to digg. - Ryan Dognaux [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 25-01-2014, 08:58
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,752
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: LabView code of other teams ?

Globals have a bad reputation. If used properly, they are fine, and often the best and most efficient method of sharing data. If used improperly, they will cause race conditions. Because they also represent a data copy operation, they can cause lag, but so will most other sharing mechanisms.

Simply opening the encoder and configuring it will make it available on the LV dashboard in test mode. That may be good enough for diagnostics, but not for driving feedback.

Sharing data to the dashboard is accomplished by reading the encoder and writing it to a SmartDashboard variable. On the dashboard the encoder will be in the Variables tab automatically. If you want it in your own display element, drop one in either Operation or Auto tabs and give it the name of the SD variable. Those tabs default to binding to SD variables using the control name. If you want other tabs to bind to SD, add them to the array on the block diagram.

For more sophisticated displays, you may instead choose to do an explicit read on the dashboard, do the calculation or combination of data, and update the display elements yourself. A good example of this would be graphing left versus right or doing other calculations and displays of encoder data. The top loop is a pretty good place for code like this. You could also make your own loop.

WPIEnhanced... is telling the driver station how the Cypress I/O board pins are to be configured. This can be done interactively on the I/O tab of the DS. It can also be done at runtime from the robot as they demonstrate.

Greg McKaskle
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi