Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in IVI driver V3.16 for Tektronix TDS30xx series

The tds30xx_Read/Fetch/FetchRawWaveform functions return allways 0 for the initialX ouput parameter.
This is caused by the following piece of code in tkds30xx.c/tkds30xx_FetchRawWaveform() :
viCheckErr( viQueryf (io, ":WFMPRE:%s:YZE?;YMULT?;XINCR?;PT_OFF?;XUNIT?;YUNIT?",
"%le;%le;%le;%ld;\"%[^\"]\";\"%[^\"]\"", dataSource,
yOffset, yMultiplier, xIncrement, &triggerPosition,
xUnits, yUnits));

/* if (strcmp (xUnits, "s") !=0)
viCheckErrElab( IVI_ERROR_INVALID_CONFIGURATION,
"Unable to scale waveform - X Units unknown");

if (strcmp (yUnits, "V") !=0)
viCheckErrElab( IVI_ERROR_INVALID_CONFIGURATION,
"Unable to scale waveform - Y Units unknown.");*/

*initialX = -triggerPosition * (*xIncrement);

The PT_OFF? command is used to get trigger position here. But the TKDS3000 series programmers manual says that PT_OFF? returns allways 0 . You can use the XZERO? command instead, which returns the ininialX value directly. So the following changed code fixes the problem :
/* Get Waveform Attributes */
viCheckErr( viQueryf (io, ":WFMPRE:%s:YZE?;YMULT?;XINCR?;XZERO?;XUNIT?;YUNIT?",
"%le;%le;%le;%le;\"%[^\"]\";\"%[^\"]\"", dataSource,
yOffset, yMultiplier, xIncrement,initialX ,
xUnits, yUnits));

/* if (strcmp (xUnits, "s") !=0)
viCheckErrElab( IVI_ERROR_INVALID_CONFIGURATION,
"Unable to scale waveform - X Units unknown");

if (strcmp (yUnits, "V") !=0)
viCheckErrElab( IVI_ERROR_INVALID_CONFIGURATION,
"Unable to scale waveform - Y Units unknown.");*/

/**initialX = -triggerPosition * (*xIncrement);*/

Can someone of NI please check that fix and include it in the next version of that driver ?
PS: The same problem seems also to exist in tkds30xx_FetchRawMinMaxWaveform()
0 Kudos
Message 1 of 2
(3,336 Views)
Hi Markus,

Thanks a lot for your feedback! We will certainly review the fix you have suggested.

Regards,

Instrument Driver group
National Instruments

P.S. You can also send your future feedback to instrument.driver@ni.com
0 Kudos
Message 2 of 2
(3,336 Views)