From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert mixed data (string/numeric) into cluster without property node

Solved!
Go to solution

Hi all,

 

I'm currently stucked trying to insert some different types of data (both numeric and strings) into a single cluster. This task was quite simple until now, when my application was in the development stage and I could use property node blocks inside a for loop to achieve it.

 

The final step of the project requires to implement the code on a myRIO 1950 board, where the developed application is going to be set as a startup one so that its operation is resumed automatically if power supply failure happens.

 

Due to the fact that property nodes can't be executed by a startup application, I'm asking for ideas to develop some code that will have the same functionality as the attached VI, but where no property nodes are included. Until now, I haven't come up with anything that works in a similar way when it comes to using clusters.

 

Thanks for your attention,

0 Kudos
Message 1 of 3
(2,303 Views)
Solution
Accepted by topic author benat94

1. Right-click on your Read From Text File.  There is an option to "Read Lines".  Turn that on.  Your entire first loop is not obsolete.

2. No need for wiring up the N on the second loop.  Use an autoindexing tunnel on your string array as well.  This also eliminates the Index Array inside of that loop.

3. Unfortunately, your setting of the values will be best done by using a Shift Register and Bundle By Name.  This will mean you will need a case for every entry in your cluster.

 

You might want to look into changing your file format into an ini or XML format.  These are more flexible and have self documentation.  Plus there are libraries already for you to use to do all of the work for you.  Look into the OpenG Variant Configuration File and the MGI Read/Write Anything libraries.  There is also a JSON library floating around somewhere if you want to try that route.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,270 Views)

Hi crossrulz,

 

The method you described here is the right thing to do, even though the task of creating entries for the cases can be rather boring in case of large clustersSmiley Frustrated I've tried it and it works! Thanks for the advice!

0 Kudos
Message 3 of 3
(2,244 Views)