ICT readbinblock function error, "Adaptor command 'read' failed with status code: 101."
Show older comments
Hello,
I'm using 2022a w/ the instrument control toolbox v4.6 (latest release), reading data from a tektronix scope over usb via a visadev adaptor.
When running the command readbinblock(instr_obj, count);, I receive the error "Adaptor command 'read' failed with status code: 101."
I've also received code -110, however I cannot find any info in the docs nor google as to what these codes mean.
The error is thrown in "Resource.m", line 579 "obj.Client.initiateReadBinblockSync();".
My workaround for the time being is repeated calls to the read function, though it doesn't read all of the available data so I have to loop it, which takes several orders longer to accomplish. I know that the older implemntation of binblock read would work reliably and ~0.1s/MS.
Is there a workaround or a 'gotcha' I'm missing with the new ICT implementation, or is this in the realm of a bug report?
1 Comment
Raymond Obenauf
on 30 Mar 2022
Answers (1)
Avni Agrawal
on 7 Feb 2024
Hi Raymond,
I understand that you are getting error while running ICT readbinblock function. Please try running this code in the driver wrapper as mentioned below:
scope = visadev(name);
scope.ByteOrder = 'little-endian';
configureTerminator(scope,"LF")
flush(scope,"output");
idn = writeread(scope,"*IDN?"); % Get scope's ID string
fprintf('Connected to: %s\n',idn);
scope.KeepAlive = true;
%% Set number of points
writeread(scope,":WAV:POIN:MODE MAX;:WAV:POIN ALL;*OPC?");
%% Capture a waveform
writeread(scope,':DIG;*OPC?');
%% Import the waveform data
write(scope,":WAVeform:SOURce CHANnel1;FORMat WORD;DATA?");
wfm = readbinblock(scope,"uint16"); % Read into array
read(scope,1); % Read the termination character
I hope this helps!
Categories
Find more on VISA Interface in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!