LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture Waveform in file for specific duration

Hey all,
 
I want to capture a Waveform for 5 seconds. I am not able to do that could any one please help me. I have tried using Timed Loop/ Tick Count.... etc etc...
 
Thank You.
--
Regards,
Sarang Dhananjay Jaiswal
Satyam Development Center, Banglore, INDIA
0 Kudos
Message 1 of 21
(4,306 Views)

Hi Sarang,

You could implement a while loop which contains the waveform capture vi.

You initialize the time (Ti) as you enter the while loop.  Pass this value to within the loop.  The time value may be in ms.  You can format it to seconds if you wish or simply remember to compare it (GT or equal) to 5000 ms.  If the new time value is GT or equal to (Ti + 5sec) then stop.

Also, place a wait within the While Loop so that other system events get processed.  The wait ms value can be set according to the number of ms that you want between samples.  You should adjust this value based on the normal delay caused by the waveform capture vi.

Hope this helps,

Ray

Message 2 of 21
(4,311 Views)
Sarang,
Another thought. Try using the example program called "Acq&Graph Voltage-Int Clk.vi" from the NI example finder in LabVIEW (Help>>Find Examples). This vi is designed to acquire a set number of samples at a particular rate. So if you want 5 seconds of data, try setting the sampling rate to 1000 Hz and the Samples per channel to 5000. If you want a better resolution try 100000Hz and 500000 samples per channel. That will give you 5 seconds of data.
 
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 3 of 21
(4,292 Views)

Hey All,

I have a big problem. I am capturing data (i.e. Waveform from Function Generator) for 1 / 5 /10 seconds. This is fine. But if I want to save data only for 10 ms  its creating a problem, its stoing data minimum of 80 ms.

I have used a while loop which runs for number of seconds depending on how much the user selects. But if the user selects 10ms it stores for 80 ms.

I think Chris_C I really have to give a thought for using your method. I hope it works. If you have some other idea's then please let me know.

Thank you.
--
Regards,
Sarang Dhananjay Jaiswal
Satyam Development Center, Banglore, INDIA
0 Kudos
Message 4 of 21
(4,269 Views)

Hi Sarang,

It looks like you have been able to resolve the problem of getting data into LabVIEW for a specific time. Now you want to save 10 ms worth of data in a  file. To better understand "if the user selects 10ms it stores for 80 ms", I would request that you post the saving part of your VI on this thread so we could take a look at it and help you out.

Ankita

 

 

0 Kudos
Message 5 of 21
(4,258 Views)

Hiii Chris,

            Is this only for the NI Device cards only, or any other card can do this by taking the drivrer of that particular cards, coz i also want to capture the data for the 10 ms and place it into the excel file and i ve reach to the amount if 15 ms resolution, but i think this is bcoz lake in the LV's while loop, coz here i am sending you thte example which also shows you that only the time stamping is also taking the time of 15 ms in the while loop. so please suggest me what to do?

Thanks,

Nishant

Message 6 of 21
(4,210 Views)

Hiiii, sarang,

                Through what you  are taking the signals from the function generator and what is the signal frequency and have you catch upto the resolution of 10 msecs, if yes please tel me. How? coz i am doing the same but not reaching at the mark.

Thanks,

Nishant

Message 7 of 21
(4,210 Views)

Hiii, Ray,

           Can you post the example for this method? I dont understand about how to initialize the time.

Thanks,

Nishant

Message 8 of 21
(4,211 Views)

Hi Nishant,

Sorry, I had not noticed your reply.  Do you still need the example?

Ray

Message 9 of 21
(4,166 Views)

Hiii, Ray,

                   Happy New year to you first of all.

                 Ya send me that example, it will be helpful to me in my ohter applications.

Thanks,

Nishant

Message Edited by Nishant on 01-03-2006 09:56 PM

Message 10 of 21
(4,160 Views)