LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I capture a waveform faster than once every 2 seconds on a Tek TDS220 Scope using GPIB running LabWindows 5.5?

I have modified "tktds2xx.c" and "tktds2xu.c to configure a TDS220 scope to capture the waveform using a new NI PCIGPIB continuously running on a PC with WindowsNT 4.0. I then display the waveform and create a histogram based on the acquired signal. The problem is that I can't capture the waveform no quicker than once every 2 seconds. Even if I remove all code except the waveform capture part I still can't capture any faster. I would like to lower the capture rate to about once every half second. I am new to CVI programming so any help would be appreciated!!
Download All
Message 1 of 4
(3,352 Views)
Hello-

It's not completely clear what is occurring from the C code. Would it be possible to include an NI-Spy capture file? It'd be best if the file was saved by enabling logging in Spy instead of using Save As.

The problem might have something to do with the instrument taking too much time to configure. It may be possible to skip the configuration on subsequent measurements.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,352 Views)
Hi, I have an NI-Spy capture file attached with the code again. The only real difference between the code I sent before and this revision is that we moved the waveform capturing functions to see if we were causing the scope to wait until the other overhead code was finished. Also, not included in the attachments, we stripped all non-essential code including the display functions with no increase in the number of acquisitions per second. We also ran the code on a PIII,1GH, Win98SE box with very little increase as well. Could it be the firmware of the TDS220 scope? Do we need to compile the code with an external compiler like Microsoft C++? Any other help would be appreciated.
Download All
0 Kudos
Message 3 of 4
(3,352 Views)
There may be a way to optimize the code. From the spy capture, it appears that the same calls are made repetitively. Maybe some of them can be shortened. It's also best to combine all writes into one call. Also, it appears that there is a VISA Get attribute that is called repetivitely.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,352 Views)