LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writeing datat to Chart References in a SubVi

Is it okay to pass a chart reference to a sub vi and write data to it? Why is it not working here? Are there any performance problems with it?

 

Thanks John

 

john_or_2-1702470286577.png

 

john_or_1-1702470251422.png

 

Download All
0 Kudos
Message 1 of 4
(718 Views)

Hi John,

 


@john_or wrote:

Is it okay to pass a chart reference to a sub vi and write data to it?


Yes.

 


@john_or wrote:

Why is it not working here?


Your loop stops on error: which error do you get?

 


@john_or wrote:

Are there any performance problems with it?


Using references/property nodes to write data into indicators is considered slow (when compared to writing to the terminal).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(712 Views)

@john_or wrote:

Is it okay to pass a chart reference to a sub vi and write data to it? Why is it not working here? Are there any performance problems with it?

 

Thanks John

 

john_or_2-1702470286577.png

 

john_or_1-1702470251422.png

 


Value is not the property you want to use.  Read the Chart History array property,  append the dequeued array to the Chart History array then write the appended array back to the Chart History property.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(698 Views)

To complete what Jay said, you likely have a data type mismatch error because you are writing an array while the chart data type is a scalar, so your loop stops at the first iteration without writing anything to the chart.

0 Kudos
Message 4 of 4
(694 Views)