09-04-2008 06:14 AM
I am facing a problem with plotting a desire graph. I am acquiring data (in Volt) from peripheral and have to plot it against a calculated data in X-axis.
the X-axis data will be calculated from time. Means like that--
x=t*5000*15
the problem is -
1. I have to access the time duration "t".
2. I have to plot X vs. Y where Y is a real time data.
is it possible to access the computer clock for this purpose or I have to do something else? Which one will be more convenient?
Should I use XY graph or something else?
09-04-2008 12:19 PM - edited 09-04-2008 12:20 PM
Hi Sukhiray,
I would recommend you to use waveforms. Waveforms give you t0, dt and Y so the time duration t=t0+samples*dt
To plot the data you can use a waveform chart
Yes you can access the computer clock. There is a function that returns a timestamp. You can find it at programming->Timing->Get Time/Date In Seconds
Check out the example I send you. It simulates a waveform. Use the DAQmx functions to acquire your data as waveforms.
Charly
09-05-2008 03:39 AM
Thank you Charly.
But as I m working in LabVIEW 8.2 I could not able to open your example. Please attach a lower version example if possible.
09-05-2008 11:38 AM
Here is the same file in version 8.2
09-07-2008 10:14 AM
Thank you once again.
I m getting the desired plot; but cannot save it into a file. the signal is manupulated at the time of ploting and there is no option from which I can save this modified graph in Excel.
Another thing is, I also have to plot only one complete cycle; for which I have to compare the peak value with the current value. Means I have to seperate the Y axis value for mathematical calculation. Is it possible to extract out the Y axis & X axis values from a real time signal?
If Yes, then how?
09-07-2008 12:57 PM
Your image is not attached. Do link to images that are on your local driver. Attach them.
Your comments are confusing. You can save whatever you want. You just have to write the code to do it. Also, if you are using the waveform graph or chart, all that you have is the Y array. You can separate a Y array from a waveform data type with the Get Waveform Components functions or you can create an X array from that data.