LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to wire numeric indicators to waveform chart?

Solved!
Go to solution

Hello everyone, I am new to LabVIEW. I am trying to plot x1 = sin(t), x2 = sin(t+2π/3), x3 = sin(t+4π/3), and x1^2+ x2^2 +x3^2. Here is what I have already done:

Screenshot 2023-10-12 at 21.12.48.png

The thing is, as I set x1,x2,x3 and x_sum as numeric indicators, I cannot wire them to waveform chart. Can anybody tell me how to fix this problem? Also, can I put all four plots into one graph? It seems like waveform chart can only be wired to one variable.

Thank you so much for spending time answering my question!

0 Kudos
Message 1 of 7
(1,892 Views)
Solution
Accepted by topic author keithduong

The chart IS an indicator.  Put it in the loop and you can wire any of the output wires to the chart as well as the DBL indicator you already have.  If you want to chart all of the outputs, combine them with a bundle.  If you hover over the chart terminal with the help open, you will see how to do it.

NIquist_0-1697118651982.png

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 2 of 7
(1,880 Views)

One more thing to do is to right-click your chart terminal and create a property node for History Data.  Put it in front of your loop and wire the error out to the loop so it always runs first thing.  Set the History to read and create a constant.  That will clear your chart at the beginning of every run.  Otherwise, your chart will remember its history and append new data which can be confusing.

NIquist_0-1697118581925.png

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 7
(1,875 Views)

use a function called "bundle" and connect all your indications into it, then wire it to thte waveform chart. Ensure you do this INSIDE the loop so the chart is updated while the loop is running, not after you press the stop button (that's how it will behave the way it is currently shown in your code). 

 

 

Message 4 of 7
(1,861 Views)

Don't forget the example finder for help with the basics either: Help > Find Examples... 

 

Click the search tab and search for waveform chart and look at this example for instance...

NIquist_0-1697119214660.png

 

Of course, you should also not forget the tutorial:  LabVIEW Tutorial (ni.com)

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 7
(1,858 Views)

ONE MORE THING!  I notice your code will not really plot waves unless you manually update your value of "t".   Your code is running in a loop that has an indicator for the iteration.  Maybe there's a way to automate "t"???  Hint:  Look at that example...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 7
(1,851 Views)

It worked! Thank you so much!

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