LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot inside a cluster is not updating

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

0 Kudos
Message 1 of 7
(1,573 Views)

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!):

 

altenbach_0-1624665654304.png

 

Why are your charts controls instead of indicators? That makes absolutely no sense! If you do the upper code as follows, everything works!

 

altenbach_1-1624665858487.png

 

 

Message 2 of 7
(1,520 Views)

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?

Intern1_0-1624812521246.png

 

0 Kudos
Message 3 of 7
(1,467 Views)

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. 

 

0 Kudos
Message 4 of 7
(1,461 Views)

@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.

 

altenbach_0-1624814622092.png

 

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!

 

Message 5 of 7
(1,457 Views)

@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.

 

altenbach_0-1624814622092.png


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.

 

 

 

0 Kudos
Message 6 of 7
(1,447 Views)

@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.

 

altenbach_0-1624814622092.png


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. 😉

0 Kudos
Message 7 of 7
(1,408 Views)