Please refer to the PL1000 Programmer's Guide - there is no serial number returned from the call to pl1000OpenUnit() function. One tip is to use the libfunctions view command in MATLAB to view the various functions in the library once you have loaded it.
Already setup the Mex and I have paste #include picoStatus inside pl1000Api.h. But now I got a new error
Error using loadlibrary (line 419)
Failed to preprocess the input file.
Output from preprocessor is:pl1000Api.h
C:\Documents and Settings\Administrator\My Documents\MATLAB\pl1000Api.h(3) : error C2006: '#include' : expected a filename, found 'identifier'
C:\Documents and Settings\Administrator\My Documents\MATLAB\pl1000Api.h(3) : fatal error C1083: Cannot open include file: '': No such file or
directory
I'm also puzzle to why it say 'No such file or directory' cause, my picoStatus.h is inside the same folder as pl1000Api.h
I tried #include "picoStatus.h" as well but it came to an error
Error using loadlibrary (line 419)
Failed to preprocess the input file.
Output from preprocessor is:pl1000Api.h
C:\Documents and Settings\Administrator\My Documents\MATLAB\pl1000Api.h(6) : fatal error C1189: #error : Operating system not defined
by the way, I actually using Windows XP X64 and my Matlab are Win64 , is there anything different than Win32 system ?
Our Windows drivers are currently only 32-bit hence they will not be compatible with a 64-bit version of MATLAB - you will need a 32-bit version of MATLAB.
The loadlibrary line is a MATLAB command and so should be called either from your command line or m-file.
Our Windows drivers are currently only 32-bit hence they will not be compatible with a 64-bit version of MATLAB - you will need a 32-bit version of MATLAB.
The loadlibrary line is a MATLAB command and so should be called either from your command line or m-file.
Regards,
I have 32-bit version of Matlab installed in my Windows XP x64, it still giving the same Operating system not defined error..
I've already done what you suggested by selecting 32-bit compiler and run again the program
No error occur but I just got this warning
Warning: Message from C preprocessor:
lcc preprocessor warning: C:\Documents and Settings\Administrator\My Documents\MATLAB\pl1000Api.h:143 No newline at end of file
> In loadlibrary at 318
In PicoLogMatlab at 5
What is exactly this warning means ? Does MATLAB could now read the device ?
My PicoLog 1012's I/O is currently not connected to anything yet (It supposed to be connected to a load cell sensor)
That's just a warning to do with the header file - you might just need to press the return key in the pl1000Api.h file after the #endif on the last line.
MATLAB should now be able to connect to the device.
Try typing the following command after loading the library:
It looks as though you have already loaded the library and are trying to load it again.
Please check whether you are loading it from the script and the command line.
Perhaps after each run of the script you need to call the unloadlibrary function? Please refer to the MATLAB Help documentation for further information.