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.
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.
05-21-2018 08:06 AM
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,
Solved! Go to Solution.
05-21-2018 10:59 AM - edited 05-21-2018 11:00 AM
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.
05-22-2018 04:54 AM
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 clusters I've tried it and it works! Thanks for the advice!