Dear. All,
I have trouble occasionally failing to execute invoke commands.
I use the invoke command to retrieve measured waveform data from a digital oscilloscope, Tektronix DPO7254 for more than ten thousand times. But, I encountered with VISA communication error and the execution of the m-script file was stopped. It seems this error happens only once over thousands of executions. It is very helpful if someone explains how to workaround VISA error and retry invoke commands by using mscript.
My program include scripts as follows,
deviceObj = icdevice('DPO7254.mdd', interfaceObj);
set(interfaceObj, 'OutputBufferSize', 2*DSO_DATA_SIZE+10000);
groupObj = get(deviceObj, 'Waveform');
set(deviceObj.Waveform(1), 'Precision', 'int16');
[CH1,T_measure] = invoke(groupObj, 'readwaveform', 'channel1',true);
[CH2,T_measure] = invoke(groupObj, 'readwaveform', 'channel2',true);
[CH3,T_measure] = invoke(groupObj, 'readwaveform', 'channel3',true);
[CH4,T_measure] = invoke(groupObj, 'readwaveform', 'channel4',true);
Best Regards
W. I.