Matlab cant connect

Legacy support with Phidget21

Matlab cant connect

Postby ffontana » Wed Dec 02, 2009 3:25 am

For a work at university we need a PhidgetAdvancedServo 8-Motor Board. Unfortunately at the moment we can not get it to work under Matlab.

Here is our Setup:
Windows XP SP3
Matlab 7.8.0 R2009a
1061 - PhidgetAdvancedServo 8-Motor
Phidget-x86_2.1.6.20091105.msi (we used this Driver)

Although under Windows with the Phidget Control Panel it works, under Matlab it cant connect we tried the original Servo.m sample file but at the following line an error occurs

calllib('phidget21', 'CPhidget_waitForAttachment', handle, 5000)
returns 13 (Timeout)

Then i tried manulay also this but without succes
serial = libpointer('int32Ptr',0);
calllib('phidget21', 'CPhidget_getSerialNumber', handle, serial)
returns 5 (Board not connected)

I hope someone has encountered the same problem and can help me.

By the way on line two the following comment can be found
% phidget20.h needs to be on the path
is this from on old version or do I need to install this?

Does it matters if the Pidget Control Panel is running at the same time as matlab?



Re: Matlab cant connect

Postby AdamS » Wed Dec 02, 2009 11:41 am

The connection fails because you are trying to use the servo example for an AdvancedServo.

You want to use the AdvServo.m file and you should be fine.

I understand the confusion but our Servo example is meant for use with the 1000 1 motor servo controller. Whereas the 1061 and 1066 are AdvancedServo controllers and require the Advanced Servo code samples.


Re: Matlab cant connect

Postby ffontana » Wed Dec 02, 2009 2:13 pm

Thank you verry much for the fast reply, was the right decision to buy your board then ;-)
I thought the advanced Servo File is for the same board but with more complex examples.


Re: Matlab cant connect

Postby AdamS » Wed Dec 02, 2009 2:54 pm

Nope, the Advanced Servo controller and Servo controller are different boards. They are very similar however the advanced servo controller provides more control over other properties of a servo motor that the normal Servo controller does not. As such they have different API calls and require a different example.

Return to “Matlab”

Who is online

Users browsing this forum: No registered users and 0 guests