Problem to load phidget21Matlab.h

Legacy support with Phidget21
gfalco
Fresh meat
Posts: 3
Joined: Wed Jan 11, 2012 11:51 am
Contact:

Problem to load phidget21Matlab.h

Postby gfalco » Wed Jan 11, 2012 12:08 pm

Hello,

First, sorry for my very bad English.

I'm a teacher of mechanical engineering at the high school.
I want to pilot a robot commanded by Phidgets cards through matlab/simulink.

When I try to use examples from the Phidgets internet site, the following problem occurs :

Error loading library intermediate output follows.
The actual error is at the end of this output.
*********

Failed to parse type '...' original input ' ...'
Found on line 702 of input from line 701 of file C:\\Program Files\\Phidgets\\phidget21Matlab.h
Error parsing argument for function CPhidget_log function may be invalid.

Type 'GPSTimePtr' was not found. Defaulting to type voidPtr.

Found on line 1372 of input from line 1371 of file C:\\Program Files\\Phidgets\\phidget21Matlab.h

Type 'GPSDatePtr' was not found. Defaulting to type voidPtr.

Found on line 1374 of input from line 1373 of file C:\\Program Files\\Phidgets\\phidget21Matlab.h

Type 'NMEADataPtr' was not found. Defaulting to type voidPtr.

Found on line 1378 of input from line 1377 of file C:\\Program Files\\Phidgets\\phidget21Matlab.h
*********
Error using loadlibrary (line 421)
The function call type stdcall is not supported

>>


I use matlab 2011 on a seven64.

Thanks a lot in adavance for your help


Gabriel Falco

gfalco
Fresh meat
Posts: 3
Joined: Wed Jan 11, 2012 11:51 am
Contact:

Re: Problem to load phidget21Matlab.h

Postby gfalco » Mon Jan 16, 2012 4:21 am

I bought a significant number of modules and components.
All work via the interface Phidgets.
In Matlab R2011b, it does not work, there are errors in the phidget21Matlab library.
It is a problem due to the library or it is a problem of method of installation.
I read the Getting_Started_MATLAB.pdf, I made what I understood, but my level of computing is novice, my level of English, hardly higher, like a lot of French...
Is there somebody who could give me the proper and complete method to follow:
1:
2:
3:
...
In this way, I could verify if I make errors.
Thank you.

jchiu
Phidgetsian
Posts: 14
Joined: Fri Oct 28, 2011 10:57 am
Contact:

Re: Problem to load phidget21Matlab.h

Postby jchiu » Mon Jan 16, 2012 12:23 pm

Did you install the Phidgets 21 drivers?

http://www.phidgets.com/drivers.php

All I had to do to get it to work was install those drivers and then get phidget21Matlab.h from the sample code Matlab zip file at:

http://www.phidgets.com/programming_resources.php

Looks like you have the sample code at phidget21Matlab.h already, I'd check to see if the drivers for Phidgets 21 installed correctly.

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Problem to load phidget21Matlab.h

Postby Patrick » Mon Jan 16, 2012 12:28 pm

It looks like Matlab doesn't like the '...' argument of CPhidget_log - you can just delete this line from the phidget21Matlab.h file. I'm not sure why the error is coming up as it's never been an issue before.

-Patrick

gfalco
Fresh meat
Posts: 3
Joined: Wed Jan 11, 2012 11:51 am
Contact:

Re: Problem to load phidget21Matlab.h

Postby gfalco » Thu Jan 19, 2012 1:04 am

Thanks a lot,

I just remove the '...' and it seems to run. (With some "warning")

I will make tests this week.

Wolff
Phidgetsian
Posts: 5
Joined: Fri Feb 10, 2012 2:54 pm
Contact:

Re: Problem to load phidget21Matlab.h

Postby Wolff » Fri Feb 10, 2012 3:00 pm

I have the exact same problem as the user galileo. I am trying to run one of the example files but there are problems with the .h-file. I removed the problematic lines 701 and 702 from the phidget21Matlab.h file but and ran the servo.m file. But then Matlab says "Could not open servo"

Error loading library intermediate output follows.
The actual error is at the end of this output.
*********

Failed to parse type '...' original input ' ...'
Found on line 702 of input from line 701 of file C:\\CarmEncoding\\AcceleroCalib\\Code\\Phidget\\phidget21Matlab.h
Error parsing argument for function CPhidget_log function may be invalid.

Type 'GPSTimePtr' was not found. Defaulting to type voidPtr.

Found on line 1372 of input from line 1371 of file C:\\CarmEncoding\\AcceleroCalib\\Code\\Phidget\\phidget21Matlab.h

Type 'GPSDatePtr' was not found. Defaulting to type voidPtr.

Found on line 1374 of input from line 1373 of file C:\\CarmEncoding\\AcceleroCalib\\Code\\Phidget\\phidget21Matlab.h

Type 'NMEADataPtr' was not found. Defaulting to type voidPtr.

Found on line 1378 of input from line 1377 of file C:\\CarmEncoding\\AcceleroCalib\\Code\\Phidget\\phidget21Matlab.h
*********
Error using loadlibrary (line 421)
The function call type stdcall is not supported

Error in phidgettest (line 5)
loadlibrary('phidget21','phidget21Matlab.h');


I use Matlab R2011b on a 64-bit Win7. I have Visual Studio installed and use this compiler. Microsoft Visual C++ 2008 SP1 in c:\Program Files (x86)\Microsoft Visual Studio 9.0 .
Can you help me?
Thanks in advance.

mphi
Phidgetly
Posts: 39
Joined: Tue Nov 16, 2010 4:27 pm
Contact:

Re: Problem to load phidget21Matlab.h

Postby mphi » Wed Mar 14, 2012 1:20 pm

To get our MATLAB examples to work under 64 bit Windows, you will need to add the following couple of lines to the very beginning of the phidget21Matlab.h file.

#ifndef WIN32
#define __stdcall
#endif


Return to “Matlab”

Who is online

Users browsing this forum: No registered users and 1 guest