LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster order

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

 

 

 

 

 

 

0 Kudos
Message 1 of 14
(4,020 Views)

We cannot troubleshoot a picture, specially it only shows some numbers. Attach your VI.

0 Kudos
Message 2 of 14
(4,015 Views)

If you were Bundling/Unbundling by name, the order would not matter so much.


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 3 of 14
(4,002 Views)

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.

0 Kudos
Message 4 of 14
(3,997 Views)

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 

 

0 Kudos
Message 5 of 14
(3,987 Views)

Hello again.

 

Here is my Labview program.

As Iam quite new to Labview, my code is very messy. (Sorry for that).

 

Regards,

 

Mike

0 Kudos
Message 6 of 14
(3,958 Views)

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:

 

LoadMain3_BD.png

0 Kudos
Message 7 of 14
(3,926 Views)

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

0 Kudos
Message 8 of 14
(3,905 Views)

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:

Example_VI.png


GCentral
0 Kudos
Message 9 of 14
(3,886 Views)

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

0 Kudos
Message 10 of 14
(3,876 Views)