View Single Post
  #11   Spotlight this post!  
Unread 09-01-2012, 22:51
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: What are you doing different from last year?

Quote:
Originally Posted by Jester View Post
It seems to me that ini would be an easier to read outside of labview, but the intellectual value of both seem similar.
LabVIEW actually has a whole palate for reading and writing INI files. I personally like them because they're organized into sections, and have an easy key/value system which can easily be parsed by LV.

A sample INI File is like this (with two sections, and associated key/value pairs):
Code:
[pidConstants]
p=.1
i=0
d=.01

[drivePID]
p=.2
i=0
d=.02
In LV, you can work with different sections independently, and easily read/write to your files. Take a look through the Configuration Files Palate (Programming -> File IO -> Configuration File VIs). I also think there are some examples installed by default that highlight their use.

Now, you could also use XML files to the same result, and I certainly won't stop you from doing that, but my personal opinion is that it's best to use an INI file in this situation.

Quote:
Originally Posted by JohnGilb View Post
Are there similar benefits when using INI?
Actually, I'm not exactly sure the answer to that question. I know you can set the default value for data read from an INI file, but I'm not sure if/how to do it using a TypeDef. You might have to write a subVI. Hmmm, I'll have to think about that one.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android

Last edited by plnyyanks : 09-01-2012 at 22:55. Reason: answered another question I missed the first time
Reply With Quote