Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use AI acquire waveform.vi for continuous acquisition

Hello all,

I am using LabVIEW 5.1 and PCI-6023E to acquire a voltage signal continuously, display the acquired data on a chart(display one minute of data at a time)then save all the acquired data to a spreadsheet file.

When I used the random number as a signal to develop my program; everything has worked as expected. However,it is not working now as I replace the random number with a real voltage signal using the AI Acquire Waveform.vi. I have encounterd several problems:
1/ Only display one second of data at a time.
2/ The elapse time that I have calculated does not match with the time display on the chart.
3/ The program runs very very slow when I increase the number of scan
s to acquire to 1000, but my program need to acquire the signal for 15 minutes at a rate of 50Hz(50sample/second); it is about 50,000.00 samples.

Do you have any idea how should I do to make it works? I am a novice in LabVIEW; any help would be greatly appriciate.

Hao
P.S: I've attached my program if you want to take a look at them.
Download All
0 Kudos
Message 1 of 3
(4,313 Views)
Hao,

I have taken a look at your VI that you attached. Here is what I have found in relation to your 3 questions,

1) The reason you were only displaying 1 second of data had to do with the way you were manipulating the chart. I took out a lot of that and started over and got it to work. You must make sure to clear the chart before you begin your program.

2) The way that you were figuring out your time was very convoluted. I changed it so that it is using the tick count which is a lot more accurate. I then used shift registers to compare the two values.

3) The reason the program is running so slow is that you are acquiring a lot of data. When you specify >3000 pts (like the attached program did), LabVIEW is stuck in that VI while the data is
acquired. So if you are acquiring data in one minute chunks (50Hz and 3000 pts), will not have any functionality during that time. If you want more functionality from your program, you can scan for 1 second’s worth of data and do that over and over again. Other than that, you must wait until the acquisition is complete.

I have attached a VI that does what I think you want it to do. If not, it is a good base to start from. I do not have LV 5.1, so I saved it from 6 -> 5.0. It should work though,

Andrew
0 Kudos
Message 2 of 3
(4,313 Views)
Hello Andrew,

Thank you so much for your help. Yes, I've got it worked now. I've just realized that the AI Acquird Waveform which modified to configure only once only worked fine for 10Hz or less; therefore, I used the AI config, AI Start, AI Read VI and placed them in a while loop. It works perfectly now.

Thank you
Hao
0 Kudos
Message 3 of 3
(4,313 Views)