PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
global data;
loadlibrary('PS3000a.dll','ps3000aApi.h');
if ~libisloaded('PS3000a')
error('library PS3000a.dll or PS3000a.h not found') %check if the library is loaded
end
data.unithandle = 0;
data.serial =[];
[status_open, data.unithandle, data.serial] = calllib('PS3000a', 'ps3000aOpenUnit', data.unithandle, data.serial)
status_close = calllib('PS3000a', 'ps3000aCloseUnit', data.unithandle);
unloadlibrary('PS3000a');
Code: Select all
>> PicoMatlab
Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness. Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary at 347
In PicoMatlab at 4
Error loading library intermediate output follows.
The actual error is at the end of this output.
*********
Type 'u_int64_t' was not found. Defaulting to type error.
Found on line 6609 of input from line 812 of file C:\\Users\\david.mcknight\\Documents\\MATLAB\\WSL\\ps3000aApi.h
*********
Error using loadlibrary (line 421)
Building PS3000a_thunk_pcwin64 failed. Compiler output is:
cl -I"C:\Program Files\MATLAB\R2011b\extern\include" /W3 /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /nologo
-I"C:\Users\david.mcknight\Documents\MATLAB\WSL" -I"C:\Users\david.mcknight\Documents\MATLAB\WSL" "PS3000a_thunk_pcwin64.c" -LD -Fe"PS3000a_thunk_pcwin64.dll"
PS3000a_thunk_pcwin64.c
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(54) : error C2628: 'int64_t' followed by '__int64' is illegal (did you forget a ';'?)
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(54) : warning C4091: 'typedef ' : ignored on left of '_Longlong' when no variable is declared
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(810) : error C2146: syntax error : missing ')' before identifier 'holdoff'
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(810) : error C2081: 'u_int64_t' : name in formal parameter list illegal
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(810) : error C2061: syntax error : identifier 'holdoff'
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(810) : error C2059: syntax error : ';'
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(810) : error C2059: syntax error : ','
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(812) : error C2059: syntax error : ')'
PS3000a_thunk_pcwin64.c(951) : error C2065: 'u_int64_t' : undeclared identifier
PS3000a_thunk_pcwin64.c(951) : error C2146: syntax error : missing ';' before identifier 'p1'
PS3000a_thunk_pcwin64.c(951) : error C2065: 'p1' : undeclared identifier
PS3000a_thunk_pcwin64.c(952) : error C2275: 'PS3000A_HOLDOFF_TYPE' : illegal use of this type as an expression
C:\Users\david.mcknight\Documents\MATLAB\WSL\ps3000aApi.h(329) : see declaration of 'PS3000A_HOLDOFF_TYPE'
PS3000a_thunk_pcwin64.c(952) : error C2146: syntax error : missing ';' before identifier 'p2'
PS3000a_thunk_pcwin64.c(952) : error C2065: 'p2' : undeclared identifier
PS3000a_thunk_pcwin64.c(955) : error C2065: 'p1' : undeclared identifier
PS3000a_thunk_pcwin64.c(955) : error C2146: syntax error : missing ')' before identifier 'u_int64_t'
PS3000a_thunk_pcwin64.c(955) : error C2065: 'u_int64_t' : undeclared identifier
PS3000a_thunk_pcwin64.c(955) : error C2100: illegal indirection
PS3000a_thunk_pcwin64.c(955) : error C2059: syntax error : ')'
PS3000a_thunk_pcwin64.c(955) : error C2297: '*' : illegal, right operand has type 'const char *'
PS3000a_thunk_pcwin64.c(956) : error C2065: 'p1' : undeclared identifier
PS3000a_thunk_pcwin64.c(956) : error C2065: 'p1' : undeclared identifier
PS3000a_thunk_pcwin64.c(956) : error C2065: 'p1' : undeclared identifier
PS3000a_thunk_pcwin64.c(957) : error C2065: 'p2' : undeclared identifier
PS3000a_thunk_pcwin64.c(958) : error C2065: 'p2' : undeclared identifier
PS3000a_thunk_pcwin64.c(958) : error C2065: 'p2' : undeclared identifier
PS3000a_thunk_pcwin64.c(958) : error C2065: 'p2' : undeclared identifier
PS3000a_thunk_pcwin64.c(959) : error C2059: syntax error : ','
PS3000a_thunk_pcwin64.c(959) : error C2146: syntax error : missing ')' before identifier 'u_int64_t'
PS3000a_thunk_pcwin64.c(959) : error C2146: syntax error : missing ')' before identifier 'u_int64_t'
PS3000a_thunk_pcwin64.c(959) : error C2065: 'u_int64_t' : undeclared identifier
PS3000a_thunk_pcwin64.c(959) : error C2059: syntax error : 'type'
PS3000a_thunk_pcwin64.c(963) : error C2061: syntax error : identifier 'ulongint16PS3000A_CHANNEL_INFOint32voidPtrvoidPtrint32Thunk'
PS3000a_thunk_pcwin64.c(963) : error C2059: syntax error : ';'
PS3000a_thunk_pcwin64.c(963) : error C2059: syntax error : 'type'
Error in PicoMatlab (line 4)
loadlibrary('PS3000a.dll','PS3000aApi.h');
I am wondering if it might be that my 64 bit version of MATLAB is having trouble with the driver running in 32bit compatibility mode. Might it be possible to get a DLL compiled as 64bit?Error using loadlibrary (line 421)
There was an error loading the library "C:\Users\david.mcknight\Documents\MATLAB\WSL\PS3000a.dll"
C:\Users\david.mcknight\Documents\MATLAB\WSL\PS3000a.dll is not a valid Win32 application.
Caused by:
Error using loaddefinedlibrary
C:\Users\david.mcknight\Documents\MATLAB\WSL\PS3000a.dll is not a valid Win32 application.