LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a 2 Y to an express XY graph

I have a problem, I need to graph 2 diiferent pressure sensor vs a servo current, and I can add a second Y (pressure sensor) to have both in one graph vs current on X

0 Kudos
Message 1 of 5
(436 Views)

Bundle the data in a cluster and build the 2 clusters in an array that you then wire to an XY graph. 

Graph.png

0 Kudos
Message 2 of 5
(411 Views)

This is very easy in LabVIEW.  Just take a look at the shipping example called XY Multi Plot.vi.  Help > Find Examples...  Search tab and search "xy" or "Multi".

NIquist_0-1709827999324.png

You don't need to use the Plot Multi XY .vi and create a 2D picture.  I added the XY graph to this example to show you how to connect it.

 

Sorry if you need to use Express VIs, I have no idea how to use them, or if they can even do multiple plots. 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 5
(405 Views)

There is really no such thing as as express xy graph. It is just a plain xy graph with a "build xy graph" express VI tacked in front of it.

 

One feature of that express VI is that it can retain data between calls and can thus act as an "xy chart". As a first step, we need to know what mode you are using.

 

I never in my live use that express VI, and if your data arrives one set of three points (x, y1, y2) at a time, You can easily built it into a 2D array and graph that (after some simple processing).

 

Here are the two possibilities (There are many more ways to do all that!)

 

The top code simulates "retain data between calls" of the express VI and you could even wrap it into a subVI containing e.g. a feedback node and it would exactly (much better!) as the express VI. Just add some functionality to e.g. an optoin to clear the memory and handle situations where the input array changes (e.g. [x,y1,y2] --->>> [x, y1,y2,y3]).

 

altenbach_0-1709830235587.png

 

0 Kudos
Message 4 of 5
(386 Views)

Assuming you want to chart the data live (arriving one point at a time for x, y1, y2), here's one simple way to do it.

 

altenbach_0-1709832160043.png

 

 

Of course if your "servo current" is a linear ramp, you don't need an xy graph at all! we would know much more if you would attach a simplified version of your VI!!!

Message 5 of 5
(372 Views)