Page 1 of 1

Phidget 1002 unable to connect

Posted: Thu Aug 27, 2020 8:58 pm
by Liner
Has anyone had difficulty connecting with waitForAttachment? Specifically:

Phidget 21 Control Panel/Drivers are installed and is able to control a Phidget 1002 4-Analog Output device (version 101) confirmed on an oscilloscope.

I am using MATLAB 2018b in Windows 10 (64 bit) with all the .h files in the project folder with the following code:

loadphidget21; % loads 'phidget21Matlab_Windows_x64.h'

phid = libpointer('int32Ptr'); % set up the phidget id pointer/handle

% there were no .m examples for analog out, though in the .h file I
% saw that 4 channel analog output devices were supported. So I used
% the following to create a software interface:
calllib('phidget21', 'CPhidgetAnalog_create', phid); % returns a 0 success
% then theoretically
calllib('phidget21', 'CPhidget_open', phid, -1); % returns a 0 success

% But when calling waitForAttachement
calllib('phidget21', 'CPhidget_waitForAttachment', phidret2, 3000)

% it returns a 13 TIMEOUT code.

Any company devs or other programmers have success?

Thanks!
-Liner

Re: Phidget 1002 unable to connect

Posted: Fri Aug 28, 2020 8:19 am
by mparadis
Do you still have the 1002 open in the Phidget Control Panel? Only one program can access a Phidget at any given time.

Re: Phidget 1002 unable to connect

Posted: Fri Aug 28, 2020 10:09 am
by Liner
I did have the control panel open! I did not realize it was required to be closed to access the phidget. This worked thanks. Will keep working with it.