LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display several curves on the same graph

 

hello everyone,

My problem is the following:

I am in the process of acquiring data using an instrument.

I want to make this acquisition N times and I would like that on a single graph to be able to display the result of each of my acquisitions.

Does this seem possible to you?

thank you very much to you.

0 Kudos
Message 1 of 6
(931 Views)

Hi asmae,

 


@asmae97 wrote:

I want to make this acquisition N times and I would like that on a single graph to be able to display the result of each of my acquisitions.

Does this seem possible to you?


Yes, sure it's possible!

Just create an array of plots!

 

The context help for charts/graphs show how to create the needed datatype…

Best regards,
GerdW


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

LabVIEW is a full featured programming language, so everything is possible. Typically you would build up your data structure in a shift register, but the exact method depends on many factors that you have not told us..

 

We can typically provide much more specific help if you would tell us a bit more about your VI, especially the data structures. Can you attach a simplfied VI?

 

  • What is the data structure for one plot (1D array? waveform? dynamic? XY?, etc.)
  • Where does the data come from?
  • Are all plots spaced equally in time?
  • Do all plots have the same timing?
  • Do all plots have the same number of points?
  • Does each new plot arrive at once or one point at a time?
  • Do you know N before the program starts or can it change?
  • ...

 

0 Kudos
Message 3 of 6
(905 Views)

Thank you very much for your answer.

the figures shows the program that allows me to make the acquisition.

and I want to do this acquisition 5 times and display the 5 results on the same graph.

thank you 

Download All
0 Kudos
Message 4 of 6
(857 Views)

Hi asmae,

 

then you need to build an array of plots. Did you even tried it so far?

 

What about using an autoindexing tunnel at the loop border?

 

Btw. when discussing code problems then you should attach real code - and not just images of code...

Best regards,
GerdW


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

We cannot debug images (e.g. we cannot tell the exact datatype of the power spectrum but it is probably a cluster of x and y 1D arrays. We cannot know typical control values, etc.), but we can give some minor comments:

 

  • Do you want each plot to appear after it is generated or is it sufficient to graph all at once after the loop has completed?
  • Why are all your controls inside the loop? Do you really want to deal with the possibility that they can be changed randomly by the user during the run?
  • Do you really need to create a new resource, configure it, measure, then destroy it with each iteration or would it be sufficient to have only the measurement steps inside the loop?
  • How much LabVIEW experience do you have?

 

0 Kudos
Message 6 of 6
(826 Views)