06-25-2021 04:34 PM - edited 06-25-2021 04:36 PM
Hello,
I was working on a program and have a plot inside of a cluster. I can't seem to update the plot using a property node associated with the cluster.
However, if I create a property node that is associated with JUST the plot I can update the data.
I would like to know why this is the case.
I attached a small VI that I was using to debug the issue. The top plot is the one inside of the cluster that is not updating. The bottom plot updates without a cluster (using a property node directly tied to it).
Thank you everyone
06-25-2021 07:06 PM
I am curious why you would even try to do this in such a convoluted way? You have a chart inside the cluster, not a plot.
Then there are code sections straight out of the Rube Goldberg playbook (and also controls with incorrect mechanical action!):
Why are your charts controls instead of indicators? That makes absolutely no sense! If you do the upper code as follows, everything works!
06-27-2021 11:49 AM
Thanks for the reply.
Another question pertaining to this:
Why can't I use a value property node associated with the output cluster?
If you wire the output of the bundle by name into a property node, the chart will not update (even after making the chart an indicator). Do you know the reason for this?
06-27-2021 12:09 PM
I believe it to be a bug.
Wiring that up to just the cluster or to a property node created by selecting only the chart works as you expect.
Another user had the same issue in the past: https://forums.ni.com/t5/LabVIEW/Updating-Waveform-Chart-Programatically-in-Cluster/td-p/3287896?pro...
Updating the chart as you have it has caused issues before.
Any other numeric or string indicators that you add into that cluster will update with the property node, but the chart will still be blank.
Maybe @altenbach knows more about it than I do.
06-27-2021 12:29 PM
@Intern1 wrote:
Why can't I use a value property node associated with the output cluster?
From the rest of your code, we know that you are a beginner and at this time you have a very unhealthy obsession with value property nodes. Lose it!
As has been said above, it might well be a limitation (or maybe a tiny buglet or even intentional to avoid a workaround that is very expensive?) and I doubt that it will get fixed just to allow writing convoluted code that has dozens of better solutions.
In this case everything works if you replace the value property node with a local variable, a much more efficient solution that does exactly the same.
Value property nodes are extremely inefficient and expensive, because they execute synchronously and force a thread switch. Local variables don't have that problem. Still, wire directly to the terminal if possible. No other nodes needed!
06-27-2021 02:45 PM
@altenbach wrote:
In this case everything works if you replace the value property node with a local variable, a much more efficient solution that does exactly the same.
That might 'work', but you'd better make sure you understand what happens if you have more than one chart in the cluster and you update only one of them using Bundle by Name.
06-28-2021 08:40 AM
@Darin.K wrote:
@altenbach wrote:
In this case everything works if you replace the value property node with a local variable, a much more efficient solution that does exactly the same.
That might 'work', but you'd better make sure you understand what happens if you have more than one chart in the cluster and you update only one of them using Bundle by Name.
I have not even tried that. My gut feeling tells me not to put charts inside clusters anyway. 😉