10-08-2020 02:24 AM
Hello,
I'm having a problem when adding values to an array within a cluster.
This part used to work untill yesterday when I made a small change on the yellow VI. WHat I use to do was adding my results into an array and then adding this array to another for it to be shown in the front view. As you ca see I've placed probes to see if I just didn't get any data to put in the arrays. However, the probes show that data is put into the "value" property of "DataLogger read", but still it is not showing in the front view.
For example this piece of code that does the exact same thing works while the first one doesn't. As you can see below the data is shown in the front view.
Solved! Go to Solution.
10-08-2020 02:42 AM
Hi Frougeur,
what happens when you use the table terminal instead of the "Value" property node to write new data into the indicator?
Why do you need all those property nodes at all? I advise against using indicators as "data collectors", they still are just indicators…
10-08-2020 02:47 AM
I'm sorry I am still rather new to LabVIEW, what do you mean by the table terminal ? Using directly the array ?
I'm using the property nodes because that's the only way I know to access the array as it is within a cluster.
10-08-2020 03:15 AM
Those property nodes are not synchronized?
It's hard to tell just looking at a few snippets, but it seems to me Value property could be read before the yellow VI executes. The fact that it's right from it, doesn't mean it's not executed as soon as possible.
Use execution highlighting, or breakpoints to check.
To fix it, use error wires to force execution flow.
10-08-2020 03:25 AM
In general it's considered bad practice to use a GUI element as data container.
You're using the table to store historic data. It would be safer (more robust and clearer) to use a 2D array of string in a shift register to keep the data, and then put it in the table. This has all kinds of advantages, for instance, you can pass the 2D array through a subVI.
You'll eliminate all risk of race conditions, that you will always have when using by reference (those property nodes reference the table). LabVIEW works best if you embrace data flow.