LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Config. file in Labview

 

 

I have a configuration file which has string as well as numbers.Config. file has data of  10 motors with encoder reading,temperature,card information and so on.  I would like to  use the data in config. file  for  different motor movements. If I use string function then everytime i have to convert string in to number and while saving file number in to  string. In doing this conversion  I lost the accuracy as well  I think this is not the correct procedure.  Can any one suggest me how I can overcome this problem. If you need code with config file I can post or send.

 

 

kane

Room No 22 Building Indus-2
Raja Ramanna Centre for Advanced Technology
Indore 452013(India)
0 Kudos
Message 1 of 5
(2,738 Views)

hi RRCAT,

 Basically config file is an ascill file which has fields/keys and initialsing/configuring data...Obviously all the data will be in the form of strings only..The only  one thing as you told that you are losing precision is...using correct format specifiers while reading the data...Please post your config file also in the reply post.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 5
(2,736 Views)

Have you considered using a binary config file?  You won't be able to edit the config file using a text editor, but you won't lose any precision and the file size remains reasonable.  How much precision are you looking for?

 

Cheers, Matt 

0 Kudos
Message 3 of 5
(2,707 Views)

Write Key accepts a "precision" input.

 

Have you tried using that?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,698 Views)

Why are you using a string type?  As Ben implied, you should be using a DBL type with your config file.  Then you can specify the precision.

 

ConfigFileDBL.png

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 5
(2,688 Views)