LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add multiple plots programtically to XY graph.

Hello,

     I am new to Labview.My code is reading Voltage value from no. of Power supply & storing in 1D-array of string. No. of power supply will depend upon user selection. Now I want to plot all these Voltage's value to XY graph,in which X is time stamp at which  value is read & Y  is Voltage value.

        Please suggest me a solution to add multiple plots programtically according to the no of power supply, so user can have a one XY Graph with multiple plots of  Voltage's value of each Power supply.

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

Smiley Wink

Untitled.png

Message 2 of 9
(8,624 Views)

From the help:

"

Displaying Multiple Plots on XY Graphs

The XY graph accepts three data types for displaying multiple plots. The XY graph accepts an array of plots, where a plot is a cluster that contains an x array and a y array. Refer to the (X and Y arrays) Multi Plot graph in the XY Graph VI in the labview\examples\general\graphs\gengraph.llb for an example of a graph that accepts this data type."

 

As Kate shows, wire an array of plots.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 9
(8,604 Views)

Better hide from the front panel. In my projects user used to had 6 plot at the maximum. Before plotting I used to ask how many parameter you want to plot. All the time I used to plot 6 plots only but visible according to parameter selection done by user.

 

Here is what I used to do

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 9
(8,599 Views)

Even easier is to show the Plot legend and Plot Visibility tick box. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 9
(8,593 Views)

 Thanks all of you for your reply.

All above solution are static.

    In my code  no. of power supply selection is user dependent,if user has selected 3 nos i need 3 plots in a XY graph, if 5 than 5 plots.

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

 I need a dynamic solution.

0 Kudos
Message 7 of 9
(8,542 Views)

Multiple plots on an XY graph are created by wiring an array of clusters of X Y data in.

 

Say you have a 2D array of X data (i.e. an array of timestamp arrays) and a corresponding 2D array of Y data. You can feed those arrays into a for loop, autoindexing them, then bundle them together. Passing this bundle out and auto-indexing again will create an array of clusters of XY data to wire to the graph.

 

So say I've got X data and Y data for my plots, and I have 4 plots worth of data, but I only want to plot two. I use array subset to return only the first two, pass the arrays to the for loop, bundle and then plot.

 

cut-plots.png

---
CLA
Message 8 of 9
(8,522 Views)

Hi everyone,

 

I'm fairly new to Labview but I've constructed this VI. I have a problem with getting the I-V measurements from my labview VI using Keithley 6430.

 

The current - time measurements works fine, however for some reason, the I-V measurement just doesn't compute. Any help would be greatly appreciated please.

 

Cheersss

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