Jump to content

(Semi)Automatic Type Conversion


Recommended Posts

Dear all,

I am looking for a possibility to

- read out a (linux-like) config file (comments start with #, value01 = abc, etc) --> DONE

- isolate usable lines (value01=abc) --> DONE

- parse this content to a "configcluster" --> OPEN

I have defined this configcluster as typedef. Now I want to connect this cluster to a function/VI that searches inside the usable lines (it's a string) for the names of the elements, gets the value behind the name, convert it to the type the element inside the cluster represents and inserts it into the cluster. I have the openG data Tools in use - perhaps I have overseen a simple solution?

This is an alternative to the LV-config-file VIs, in my opinion their use is rather unconvenient (and also this automatism is missing).

The advantage of my effort should be, that I can easily change/enlarge my configcluster(typedef) without applying changes to the readout-and-parsing-functionality.

Thank you!

Martin

Link to comment

Take a look here

http://www.mooregood...iteAnything.htm

This does read/write to ms style config style VI's (not the linux style config VIs) but you can get a lot of insight about how something like you are proposing might be structured. In my opinion, this set of VI's pretty much solves the problem of easy to read, write, and create config files. I've used them quite a while with no problems.

I also use the LabVIEW XML schema a lot but not where I expect the configs to be edited in a text editor

Mark

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.