LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use waveform chart to plot 2 signals at different sampling rates

Solved!
Go to solution

Hello,

Say I have 2 signals : one updates every half sec, and one updates every sec. I would like to display these signals in the same plot. I must use Chart and not graph for the "stacked plot" feature. I researched for an hour and my conclusion is that this is not possible for the following reasons:

1. if an array is wriiten, every time a different dimension array is written to that chart, the chart clears and re-init with the new number of plots.

2. if an bundle is written, the chart is fixed with the number of elements in the cluster, it is not possible to write a new cluster with different number of elements (wire error)

 

One interesting contradiction I observe is : only chart has "stacked mode" option, this indicates individuality, however it is not possible to update individual plots while not messing with the others.

 

Please correct me if I missed anything.

0 Kudos
Message 1 of 6
(3,405 Views)
Solution
Accepted by topic author zigbee1

Hi zigbee,

 

I must use Chart and not graph for the "stacked plot" feature.

Why do you have to?

Why not simply put two waveform graphs (or even charts) next to another and hide the x axis of one of them?

 

I researched for an hour and my conclusion is that this is not possible for the following reasons

Why not simply output the same sample twice to your "slower" plot?

 

Sometimes possible solutions are so easy… 😄

Best regards,
GerdW


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

Brilliant ! Indeed the easy solution is deferred last past data points and only update the latest. Essentially I can plot point by point in an N plot. The only issue is lots of fake data points that would show either thru Excel export or the data point markers. But I guess that's a trade off. All because NI didn't want to make stacked plot possible for waveform graphs. Smiley Very Happy

0 Kudos
Message 3 of 6
(3,392 Views)

Hi zigbee,

 

The only issue is lots of fake data points that would show either thru Excel export or the data point markers

Which issue?

Data logging shouldn't depend on the way you create some plots in the UI! You don't need to log those "intermediate" samples…

 

General comment: LabVIEW is a programming language. You can program whatever you like…

Best regards,
GerdW


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

very much agreed...Smiley Happy

0 Kudos
Message 5 of 6
(3,355 Views)

Zigbee1,

I'm not sure if I understood what he suggested and i'm through the same problem. Would you mind attaching a png demonstrating how you did it, please?

0 Kudos
Message 6 of 6
(2,901 Views)