01-30-2012 12:17 PM
Hi,
I wanted to use an array of clusters to define some configuration parameters for an application. Unfortunately, "Write Key VI" doesn't support the cluster type. Has anybody modified this function ("Write Key VI") to support cluster and array of cluster? If not, any clue to keep it as simple as possible?
My clusters include boolean, path, U32 and string.
Thank you,
Olivier
Solved! Go to Solution.
01-30-2012 12:31 PM
Use the OpenG VIs. The variant configuration library has a VI to do that.
01-30-2012 12:43 PM
Couldn't log to this website. Any alternative ?
01-30-2012 12:56 PM
The link works just fine for me. Perhaps you have a firewall issue?
The easiest way to install OpenG packages is to use JKI's VI Package Manager. You can use the free Community Edition. http://jki.net/vipm/download
01-30-2012 12:56 PM
@OD wrote:
Couldn't log to this website. Any alternative ?
Sure see this Nugget.
I have links for other methods included but the Nugget does exactly what you are asking to do. I wrote th Nugget to entertain other developers, but in the end is serves as an example why you may want to find another approach. You'll understand what I mean once you look at that Nugget.
Parapharisng from Jurrasic Park "Just because could do something does not mean we should."
Ben
01-30-2012 03:23 PM
There's also the Read/Write Anything VIs from Moore Good Ideas, which will read and write an entire cluster to an INI-style file.
01-30-2012 03:53 PM
Lastly, since you can usually afford or bury the startup time penalty Consider XML config files. Advantage- they don't need to be directly human readable since the shcema interpeates the data types. Disavantage- they arn't human readable with a simple txt editor
01-30-2012 08:16 PM
For some reasons, it can not save my cluster. What am I doing wrong here?
See the VI attached, it's quiet short.
Thanks for your time!
01-30-2012 08:31 PM - edited 01-30-2012 08:39 PM
@OD wrote:
For some reasons, it can not save my cluster. What am I doing wrong here?
See the VI attached, it's quiet short.
Thanks for your time!
I have no access to "Open-G" functions. BUT (with a great big BUT & jumping on my horse ala don Q) this is exactly why examples should be linked to the detailed help if no use cases or examples are provided in the documentation. (Off my horse)
what is with the while loop? and where is the type def cluster you want ot save to file? something looks odd here- But without OpenG functions & help------... (whimper)
02-01-2012 04:50 PM
For info, I end up saving the cluster as a binary file ("Write to Binary File Function") and make a VI to read/write it. That was the most easy way for me as the other functions seems to have some limit regarding the complexity of the clusters they can handle.
Thnaks for your suggestions,
Olivier