waitForAttachment error

Legacy support with Phidget21
Post Reply
dxc536
Phidgetsian
Posts: 5
Joined: Mon Oct 30, 2017 2:32 pm
Contact:

waitForAttachment error

Post by dxc536 »

Hello,

I understand phidgits21 is no longer supported, but since I have it my phidgets integrated with matlab, I'm still using it.

I'm using the analogin_mod.m function in a while loop where I'm getting updated values from a bendsensor.

I've recently upgraded my computer and will now unreliably run into an issue where the program "Could not open InterfaceKit" in the middle of the loop.

I open the device outside of the loop and do not close it until the loop is complete.

When the program crashes I'm find that instead of:

calllib('phidget21', 'CPhidget_waitForAttachment', phid, 500) = 0

the following occurs.

calllib('phidget21', 'CPhidget_waitForAttachment', phid, 500) = 13

any idea why I'm running into this issue? I don't understand why the device will become unattached after its opened? I've tried changing 500 to 0 and it appears to be working, but there is a delay in the code because it may take longer than 500 ms to attached again, where sometimes it's attached immediately (e.g. 1ms).
EdwardVet
Fresh meat
Posts: 1
Joined: Fri Feb 09, 2024 7:05 am
Contact:

Hey buddies, hope your day is as brilliant as your smiles!

Post by EdwardVet »

Delighted to witness this! Awesome insight and the level of details provided is awesome!
Thank you everybody!
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests