I'm trying to restart my PicoLog 1012 on Windows 7 using MATLAB 2013a (Win64)
I have Windows SDK 7.1 installed and done mex -setup pretty much all the necessary files are in the same folder including the thunk file.
so this is my code I'm try to run
Code: Select all
loadlibrary 'PL1000.dll' 'pl1000Api.h' addheader 'picoStatus.h' mfilename 'pl1000MFile';
if ~libisloaded('PL1000')
error('Library pl1000.dll or pl1000Api.h not found') %Check if library file loaded
end
[methodinfo, structs, enuminfo, ThunkLibName] = ps3000aMFile;
%-------------------- Program -------------------%
%% -- Open and enumerate the unit --
handle = libpointer('int16Ptr',zeros(1,1)); % short handle
[status_open, handle] = calllib('PL1000', 'pl1000OpenUnit', handle);
fprintf('Opening the device \n');
%% -- Retrieved Maximum value from the data logger --
max_Value = libpointer('uint16Ptr',zeros(1,1)); % Max value
calllib('PL1000','pl1000MaxValue', handle, max_Value);
maxValue = get(max_Value,'Value');
maxValue = double(maxValue); % Convert int16 to double
fprintf(' Max value = %f\n',maxValue);
%---------------- Unload the library ---------------%
unloadlibrary ('PL1000');
but I getting this error
Error using loadlibrary (line 419)
Failed to preprocess the input file.
Output from preprocessor is:pl1000Api.h
C:\Users\Sin\Documents\MATLAB\pl1000Api.h(16) : fatal error C1189: #error : Operating system not defined
Error in PicoLogMatlab_MaxVal (line 6)
loadlibrary 'PL1000.dll' 'pl1000Api.h' addheader 'picoStatus.h' mfilename 'pl1000MFile';