06-26-2017 11:26 AM
Hello everyone.
I have some clusters in my project and I want to write the values of the cluster elements to a measurement file. The order of the cluster elements is in the way I want to save the values to my file.
Now I noticed that the order in my logfile is totally wrong. The cluster contains 6 digital components and 12 textboxes.
Attached you find a screenshot.
I can't figure out what is wrong.
Any help would be great.
Thanks in advance,
Mike
06-26-2017 11:31 AM
We cannot troubleshoot a picture, specially it only shows some numbers. Attach your VI.
06-26-2017 11:38 AM
If you were Bundling/Unbundling by name, the order would not matter so much.
06-26-2017 11:43 AM
What kind of measurement file? A custom format or using the Config File interface for example.
For custom measurements with a range of datatypes, I have found that using the OpenG toolkits (which you can obtain through JKI's VI Package Manager) makes it quite simple to read and write clustered data to a config file. But as others have already mentioned, bundling/unbundling by name makes management that much easier.
If you are not using named clusters, then the order you add the element to the cluster is the order in which they will display or be accessed.
06-26-2017 11:58 AM
Thanks for all your comments.
When I unbundle my cluster it looks fine. Iam not unbundling by Name but from the datatype I can assume that the order is correct.
Iam using the White to measurement express vi and the LVM filformat.
Cheers,
Mike
06-26-2017 12:37 PM
Hello again.
Here is my Labview program.
As Iam quite new to Labview, my code is very messy. (Sorry for that).
Regards,
Mike
06-26-2017 01:33 PM
Your VI even crashed my snippet tool. I really really recommend you to take the LabVIEW tutorials. Your code is one of the best candidate for a Rube Goldberg competition...
Ok, maybe my snippet tool can save out some part without the code itself, so others with mobiles can comment and give also guiding how to improve your VI:
06-26-2017 03:53 PM
Hi again.
I finally found my mistake. I ordered my elements inside the cluster the way I wanted them to be written to the logfile, but when I merge the signals I do that in a different order 😞
Does anyone have a god idea how to handle that many signals.... I know that the code is messy and hard to read....
regards,
Mike
06-26-2017 09:22 PM
In the picture posted above, one simple example you could use to claer up extra nodes is visible - you multiply 8 different values (which are consecutive elements of an array) by the same scalar value - you can instead multiply the array by this value and then index after.
Following that point, you wire consecutive values to Index Array. You don't need to wire numeric constants when the values are 0..N - just drag the Index node and consecutive values will begin from 0. If you wire the first element, you get consecutive elements from that value, like here:
06-27-2017 12:31 AM
Hi.
Thank you very much for your comment!
I will try to go through my program to see if I can make it cleaner!
Regards,
Mike