LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Write Key VI with an array of cluster

Solved!
Go to solution

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 

0 Kudos
Message 1 of 12
(4,784 Views)

Use the OpenG VIs. The variant configuration library has a VI to do that.

Message 2 of 12
(4,778 Views)

Couldn't log to this website. Any alternative ?

0 Kudos
Message 3 of 12
(4,768 Views)

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

0 Kudos
Message 4 of 12
(4,764 Views)

@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

 

 

 

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

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.

0 Kudos
Message 6 of 12
(4,741 Views)

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


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 12
(4,733 Views)

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!

0 Kudos
Message 8 of 12
(4,715 Views)

@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)

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 12
(4,712 Views)
Solution
Accepted by topic author OD

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

 

Message 10 of 12
(4,675 Views)