Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronix scope driver - very slow response.

Hi,

 

I am using NI written Tektronix driver (tktds1k2k) . My scope is TDS2024B with USB connection. I am making 5 measurements and to send all the commands and read results back it takes 44 seconds. I am only reading single values back like frequency, max volt etc. I am using auto setup function and this takes 8 seconds alone. It only takes 1-2 seconds when I press the button on the scope. Almost every transaction ( set channel, set trigger etc.) takes 500 ms and up. I do not know if it is a setup problem, scope problem or driver problem. Obviously my customer will not accept 44 seconds for 5 measurements, I need to measure 2 signals so this alone ads 80 seconds to my test time.

 

My system is a Celeron based PC with 512 MB of memory, 8.1 CVI and a custom test executive. My other instrumentation is located in a PXI chassis. It is an existing system and I am adding a new product.

 

Any ideas will be greatly appreciated,

 

Thanks

Cimteker. 

0 Kudos
Message 1 of 4
(4,060 Views)

I have not used the IVI driver for that - just the LabVIEW driver but I don't remember any driver issues with that. What have you done to isolate the problem? For example, the autosetup command is ';:AUTOSET EXECUTE'. Did you run this command in MAX to see how long it takes there? Did you run an NI-Spy capture?

 

Your pc seems to be a bit under powered as well. Post your code and someone might be able to look at that to see exactly what you are doing and whether it would run faster on something a bit more powerful. Remember also that there is significant latency with USB. Make sure you have USB 2.0 on the pc.

0 Kudos
Message 2 of 4
(4,047 Views)

Thanks Dennis for you suggestions.

I am not familiar with scope's commands, so I did not send any through NI Max. My estimates are based on comparing computer controlled measurement to a manual one. I was actually able to save a few seconds, by removing a few sets in my initialization string (like RangeCheck=0,QueryInstrStatus=0, they both were 1 before). So I am down to 23 seconds, which I still think is 5 times of what I think it should take.

I also checked my ports and they are all 2.0.

 

Here's my code:

 int   maximumTime_ms=1000;

 tktds1k2k_ConfigureAcquisitionType(viTDS2024B,TKTDS1K2K_VAL_AVERAGE);
 tktds1k2k_ConfigureNumAverages(viTDS2024B,64);
 tktds1k2k_ConfigureEdgeTriggerSource(viTDS2024B,szChn,0.5,TKTDS1K2K_VAL_POSITIVE);
 tktds1k2k_AutoSetup(viTDS2024B);
 
 tktds1k2k_ReadWaveformMeasurement(viTDS2024B,szChn,TKTDS1K2K_VAL_VOLTAGE_MIN,maximumTime_ms,&low))
 tktds1k2k_ReadWaveformMeasurement(viTDS2024B,szChn,TKTDS1K2K_VAL_VOLTAGE_MAX,maximumTime_ms,&high);
 tktds1k2k_ReadWaveformMeasurement(viTDS2024B,szChn,TKTDS1K2K_VAL_FREQUENCY,maximumTime_ms,&freq);
 tktds1k2k_ReadWaveformMeasurement(viTDS2024B,szChn,TKTDS1K2K_VAL_WIDTH_POS,maximumTime_ms,&pos_width);
 tktds1k2k_ReadWaveformMeasurement(viTDS2024B,szChn,TKTDS1K2K_VAL_WIDTH_NEG,maximumTime_ms,&neg_width);

I need to calculate duty cycle, so I make 2 measurments for this: pos and neg width, unless there is a measurement already in the driver for duty cycle.

Frequency usually takes the longest: 5 seconds or more. I am measuring 75MHz and 50 Mhz signal.

 

Thanks for your feedback

CT.

0 Kudos
Message 3 of 4
(4,026 Views)

Sorry, I meant to get earlier and got busy.

 

I can't really test anything without the instrument but I would try a couple of things. First, your autset should probably be the first thing you do if you are going to use that function. I was never a fan of it. I would just configure the instrument with the appropriate horizontal/vertcal/trigger, etc. functions.

 

Do you really need to take an average of 64 captures. Reducing this number will increase the speed at which the measurements will return. You might also want to consider doing the measurements with the analysis functions in CVI. Transferring the waveforms once might be much faster.

Message 4 of 4
(3,999 Views)