I am using segmented memory acquisition on the DSO-x 91604A oscilloscope. It appears that I am able to capture segments and download segments well with my Matlab program. However, when I run my program, oscilloscope shows Query interrupted error. I went through the manual and I tried to correct it by using pauses in the program after I send query or command so that it will be solved as described in the manual. but it didn't work. Another problem, the plotted waveform in MATLAB doesn't exactly look like it appears on the oscilloscope for the same segment too.
I have here attached my program which is working except message on the oscilloscope of query interrupted error and also little deviation on the plot of the segments with respect to the same segment in the oscilloscope.
It would be really great if somebody could correct my program so that I don't see the error or please give me the ideas how I can solve it? Also, how can I exactly represent each segment that appears on the oscilloscope in the Matlab without any deviations of the shape of the waveform? Is there any problem in the code I have attached here?.