PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
PS3000A_ID_Block_Example.m
Code: Select all
Copyright © 2014-2017 Pico Technology Ltd. All rights reserved.
PicoScope 3000 Series MATLAB Instrument Driver
Error using instrument/delete (line 82)
Operation failed: An error occurred while executing the driver disconnect code.
Reference to non-existent field 'unitHandle'.
If this error is not an instrument error, use MIDEDIT to inspect the driver.
Error in icdevice (line 308)
delete(obj);
Error in PS3000A_ID_Block_Example (line 54)
ps3000aDeviceObj = icdevice('picotech_ps3000a_generic.mdd', '');
Code: Select all
% This function is called after the object is created.
% OBJ is the device object.
% End of function definition - DO NOT EDIT
% Copyright © 2014 - 2017 Pico Technology Ltd. All rights reserved.
% You may copy and distribute this file as long as it remains unmodified.
% SB
fprintf('\nCopyright © 2014-2017 Pico Technology Ltd. All rights reserved.\n');
fprintf('\n');
fprintf('PicoScope 3000 Series MATLAB Instrument Driver\n');
fprintf('\n');
% Only load library once
if (libisloaded('ps3000a'))
% Do nothing
else
if (ispc)
loadlibrary('ps3000a.dll', @ps3000aMFile);
elseif (ismac)
loadlibrary('libps3000a.dylib', @ps3000aMFile, 'alias', 'ps3000a');
elseif (isunix)
loadlibrary('libps3000a.so', @ps3000aMFile, 'alias', 'ps3000a');
else
% Do nothing
end
end
% Only load library once
if (libisloaded('ps3000aWrap'))
% Do nothing
else
if (ispc)
loadlibrary('ps3000aWrap.dll', @ps3000aWrapMFile);
elseif (ismac)
loadlibrary('libps3000awrap.dylib', @ps3000aWrapMFile, 'alias', 'ps3000aWrap');
elseif (isunix)
loadlibrary('libps3000aWrap.so', @ps3000aWrapMFile, 'alias', 'ps3000aWrap');
else
% Do nothing
end
end
% Confirm data files have been loaded
if (exist('PicoConstants.m', 'file') == 0)
error('File PicoConstants.m not found - please ensure that the location of this file is added to the MATLAB Path.')
end
if (exist('PS3000aConstants.m', 'file') == 0)
error('File ps3000aConstants.m not found - please ensure that the location of this file is added to the MATLAB Path.')
end
if (isstruct(evalin('base', 'ps3000aEnuminfo')) && isstruct(evalin('base', 'ps3000aStructs')))
% Do nothing - structures have been loaded
else
error('Failed to load enumerations and/or structures from ps3000aMFile');
end
% Obtain flag to indicate if functions should output text to Command
% Window
% -------------------------------
obj.DriverData.displayOutput = obj.displayOutput;
% Enumerate units - only displayed if driver is being used via command
% line
count = int16(0);
serials = blanks(100);
serialLth = int16(100);
[status, count, serials, serialLth] = calllib('ps3000a', ...
'ps3000aEnumerateUnits', count, serials, serialLth);
if (status == PicoStatus.PICO_OK)
fprintf('Number of units found: %d\n\nSerial number(s): %s\n\n', count, serials);
elseif (status == PicoStatus.PICO_NOT_FOUND)
error('No units found.');
else
error('Status code: %d\n', status);
end
Code: Select all
obj.DriverData.displayOutput = obj.displayOutput;
Code: Select all
No appropriate method, property, or field 'displayOutput' for class 'icdevice'.
Code: Select all
instrgate
Code: Select all
icdevice