LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to adjust the samples on the X-axis of graph

Hi,

I am using USB 6229 to acquire AC voltage. I need plot history as well as the cursor on the plot , so i used waveform graph to plot the analog waveform data read from DAQ assistant.I have used build array to bulid the history of data and plot to waveform graph. I do not want to use waveform chart as it does not support cursors.

I have attached the VI. I have defined 100 samples at the rate of 1000 S/sec. If i give wait timer with 1000ms delay, and i stop the loop after 6 iterations, i get 7 secs of data when I run the  program. Every sec gets appended on the Graph as I am building the waveform.

But i need a resolution of 10 ms on the Graph. That is,, there are changes taking place in the analog voltage channel within 1 sec , (150 millisec, there may be voltage and 250 millisec, there will be no voltage). so this has to be depicted on the Graph. If i use dealy of 1000millisec, i am losing the change occuring in the voltage. So how  do i adjust the samples/sample rate/delay?

If i give delay of 10 ms and iteration as 700. I do not get the data corresponding to the actual seconds.

0 Kudos
Message 1 of 3
(2,718 Views)

hema wrote:
...

But i need a resolution of 10 ms on the Graph. That is,, there are changes taking place in the analog voltage channel within 1 sec , (150 millisec, there may be voltage and 250 millisec, there will be no voltage). so this has to be depicted on the Graph. If i use dealy of 1000millisec, i am losing the change occuring in the voltage. So how  do i adjust the samples/sample rate/delay?

... 


Assuming a screen resolution of 1024 point (so 1k for your graph), you can have 10s displayed with 10ms resolution .. without using any kind of zoom 😉 .
Have a look into the examples (Help-Find examples) to see how to set samplerate and number of points to read. A short lookup brings :
Acq&Graph Voltage-Int Clk.vi 

Message Edited by Henrik Volkers on 08-28-2008 03:21 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 3
(2,695 Views)
You've got a resolution of 10 ms because of your sample rate. What you don't have is continuous data. I think you are missing some of the basics. You set a sample rate of 1kHz and ask for 100 samples. The 100 samples are returned in 100ms (simple math). You have a 1 second wait though. That means you get 100 msec worth of data and then wait another 900 msec before starting to acquire again. Why would you do that if you want all of the data in 1 second? Increase the number of samples to equal the sample rate, get rid of the wait, or go to continuous sample mode.
0 Kudos
Message 3 of 3
(2,691 Views)