From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform chart multiple plot

I'm having some problems plotting a multiple plot in a waveform chart.

The goal what I'm trying to achieve is 1) determining the difference between real and estimated data, which I want to 2) display in said waveform chart, seperately.

This all happens within a while-loop, which you can't see in below screenshot. 

Right now all I'm getting is the difference of 1 object, instead of all objects who enter the for-loop. How do I adjust this?

 

 

Screen Shot 2015-10-27 at 13.15.12.png

0 Kudos
Message 1 of 9
(8,756 Views)

Are you going for something like this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(8,738 Views)

Please do not post screen-shots, but post actual (editable, runnable) code.  

 

I recommend you read the LabVIEW Help for Charts and Graphs.  From the fragment of code whose picture you showed, I don't think you understand how LabVIEW Charts work, and how you add points to the chart.  It is clearly explained in the LabVIEW Help.

 

Bob Schor

0 Kudos
Message 3 of 9
(8,735 Views)

@crossrulz wrote:

Are you going for something like this?

 



Yes, exactly like that.

0 Kudos
Message 4 of 9
(8,723 Views)

@Bob_Schor wrote:

Please do not post screen-shots, but post actual (editable, runnable) code.  

 

I recommend you read the LabVIEW Help for Charts and Graphs.  From the fragment of code whose picture you showed, I don't think you understand how LabVIEW Charts work, and how you add points to the chart.  It is clearly explained in the LabVIEW Help.

 

Bob Schor


Hi,

 

I really can't submit the full code, because it contains some code I don't wish to be publicly available. 

0 Kudos
Message 5 of 9
(8,717 Views)

@crossrulz wrote:

Are you going for something like this?

 


One difference though, I only want to display the difference in values, for each 'object' that enters the for-loop. So for every iteration a new plot on the waveform.

 

Edit: see my very crude sketch, since I can't reproduce what I want. So every line represents the measured difference over time per object.

 

multiplot.png

0 Kudos
Message 6 of 9
(8,714 Views)

marvin117 wrote:

One difference though, I only want to display the difference in values, for each 'object' that enters the for-loop. So for every iteration a new plot on the waveform.

 

Edit: see my very crude sketch, since I can't reproduce what I want. So every line represents the measured difference over time per object.


The chart keeps a history, so you do not have to maintain it yourself.  Just put your plot points into a Bundle like I show above and write directly to the chart terminal.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(8,697 Views)

@crossrulz wrote:

marvin117 wrote:

One difference though, I only want to display the difference in values, for each 'object' that enters the for-loop. So for every iteration a new plot on the waveform.

 

Edit: see my very crude sketch, since I can't reproduce what I want. So every line represents the measured difference over time per object.


The chart keeps a history, so you do not have to maintain it yourself.  Just put your plot points into a Bundle like I show above and write directly to the chart terminal.


I tried this, but doesn't work. See attached image. I still get only 1 plot.

 

Screen Shot 2015-10-27 at 15.31.29.png

 

Screen Shot 2015-10-27 at 15.31.39.png

0 Kudos
Message 8 of 9
(8,668 Views)

If you only have one numeric in your bundle, you're only going to have one plot. You're not building multiple plots by adding to that array, you're building an array of points on a single plot. This can all be learned from the Help file.

 

I would suggest switching to using a 2D array of data for your multiplot, to make it a little more intuitive:

Charting.PNG

 

I built the above Vi to match how you're already do it, but you can eliminate the shift registers by auto-indexing:

Building Charts.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 9 of 9
(8,653 Views)