Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I decrease the refresh time on the TDS 2014 continuous acquire?

I recently got the Tektronix TDS 200 1000 2000 Series Acquire Continuous Waveform example working, and noticed that the refresh time seemed to be about 6 seconds.  Is there any way to decrease this and get say, 200 readings a second?  Also, is there a way to determine where the time is being spent?  Thanks for your time.
 
Scott
0 Kudos
Message 1 of 8
(4,283 Views)

You can identify the time bottleneck by placing timers around each VI in the diagram (1 Tick Count VI prior and 1 after a VI and subtract the difference).  A visual inspection would probably suffice...simply highlight execution and look at the diagram to see where the code is taking the most time to execute.  A third option is to run NISpy, which will log all calls to the communications bus and also indicate the timing of the calls.

My guess is that most of the time is spent returning data from the instrument.  Your best bet to speed this up is to use GPIB (a faster bus) rather than serial.  On many scopes you could also reduce the number of samples being transferred, but I don't see that as an option here.

0 Kudos
Message 2 of 8
(4,267 Views)
I just did a quick test with this example and GPIB and the graph in the continuous example is updating every 1.5 seconds.  You can get this down to around 1.2 or 1.3 seconds by replacing the Read Waveform VI with Fetch Waveform.  This will eliminate the overhead of the Error Query VI call.
0 Kudos
Message 3 of 8
(4,266 Views)
I just wanted to add that a 5msec acquistition rate is unrealistic for a GPIB instrument and for serial, completely out of the question. If you really need to acquire that fast, you should think about using a pc based solution like one of NI's scope cards or DAQ boards.
0 Kudos
Message 4 of 8
(4,261 Views)
What kind of rates can be reached with USB? 
0 Kudos
Message 5 of 8
(4,252 Views)
Hey Scott,
The best option is to use NI-Spy, as you will know exactly how much time did it take to execute all the commands, while communicating using GPIB. Also if your device is timing out, Check this article which shows how you can change the timeout of your GPIB bus?
Good luck with everything!
Regards

Nikhil A.
0 Kudos
Message 6 of 8
(4,250 Views)
There is some great information on throughput and latency of the different buses at http://zone.ni.com/devzone/cda/tut/p/id/4819.
0 Kudos
Message 7 of 8
(4,224 Views)
And don't forget that most oscilloscopes are built for user interaction (slow) and not really for computer interaction while IOcards are really built for computer interaction
greetings from the Netherlands
0 Kudos
Message 8 of 8
(4,209 Views)