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: 

How to accumulate acquired data to array for plotting a real time XY graph

Solved!
Go to solution

I have acquired current and voltage values of which I'd like to plot XY graph. 

Problem is these are 1D waveform. 

1. Please tell me how can I accumulate these value to array so I can have my XY plot.

2. Is there any other way  to plot real time XY graph of acquired values. 

(I am using NI 9205 analog module. I can see real time waveforms i.e. current vs time and voltage vs time on my front panel.

I need current vs voltage of real time values.)

 

please help out.

thanks.

0 Kudos
Message 1 of 8
(5,424 Views)

First use Index Array to get the two waveforms out.  Then use Get Waveform Components to get the Y components of each waveform.  Then use Build Array and wire that to your XY graph.


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 8
(5,397 Views)

Actually, I have acquired 3 phase voltage and currents. I have to plot 'average current vs average voltage'. I have attached a test VI. can you please modify that to show me how to accumulate those changing values in an array so I can plot XY graph.

thank you.

0 Kudos
Message 3 of 8
(5,352 Views)
Solution
Accepted by topic author kunal1261

Try something like this....

 

 

Notes:

  • If you simulate "as fast as possible", you should place a delay inside the loop.
  • Since the array grows forever, you will ultimately run out of memory.
  • SInce the x and y simulation is at the same frequency, all points will be on the same line.
0 Kudos
Message 4 of 8
(5,331 Views)

Thank you for your suggestion. But I have to accumulate the acquired values in an array to plot the XY graph. Because  I won't just plot current vs voltage. I am also planning to calculate torque, speed and power values from current and voltage data and will be plotting torque vs speed, torque vs power plots.

So, please suggest me an alternative way where I can,

1) Accumulate the acquired values (via cDAQ)  in an array.

2) Plot real time XY graph.

3) flush that array whenever it seems overflow OR flush older values while recent values keep accumulating in the array.

 

  My previous comment has an attached VI. please help me out.

 

Thanks,

Kunal C.

0 Kudos
Message 5 of 8
(5,295 Views)

The complex array contains all the acquired data, so you can calculate any derived values from it.

0 Kudos
Message 6 of 8
(5,277 Views)

Hello all,

 

 I am using Labview 10. I need to plot a XY graph in the case both x and y values are changing. For example x=1, y= 2; x= 2, y=3; x=3, y=4;.......like that x and y values are changing continuosly. i tried to plot, but the XY graph screen shows the instantaneous values of x and y. But I need all the plot of all the x and y values.

 

For your referecne I attached my VI.

 

 

Kindly help me in this regard,

 

Thanks in advance.

 

Download All
0 Kudos
Message 7 of 8
(5,049 Views)

Hi KUDOS!

 

Did you mange build that XY Graph to plot it in real time?

 

Thanks

0 Kudos
Message 8 of 8
(4,213 Views)