Multiple attempts required to open VINT device

Supporting 2.7 and 3.2+
Post Reply
berkinet
Phidgeteer!
Posts: 95
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Multiple attempts required to open VINT device

Post by berkinet »

I am using code based mostly on the VoltageRatio example. But, adapted for the DAQ1500 and a 3133 load cell connected to a HUB0000. In general the code works. However, If I kill the code (I just added a wait for a Return after the open) and let the code run to the end, with a close(), I must try several times before I can get the code to properly load again. It always follows this progression...
First attempt throws multiple resource busy errors and then Timed Out errors before diving.

The next attempt succeeds in attaching the HUB but then throws errors in the onAttach handler

Code: Select all

Desc: Invalid Argument
Traceback (most recent call last):
  File "mailscale.py", line 66, in onAttachHandler
    ph.setDataInterval(dataInterval)
  File "/Library/Python/2.7/site-packages/Phidget22/Devices/VoltageRatioInput.py", line 175, in setDataInterval
    raise PhidgetException(result)
PhidgetException
The third attempt usually succeeds.

It seems like the HUB or the Phidget22 server (an SBC3) is too busy to complete the initial open and attach event. But, I haven't been able to track down the source of the problem, I would appreciate any thoughts on eliminating the source of the problem, or, handling the errors in a better manner to try and overcome the problem.

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

Re: Multiple attempts required to open VINT device

Post by Patrick »

Can you provide a full source example which produces this issue, as well a full description of your environment. I will set up a test here and try to reproduce.

Thanks,
-Patrick
berkinet
Phidgeteer!
Posts: 95
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Re: Multiple attempts required to open VINT device

Post by berkinet »

DOH! Problem fixed. I decided I should test to see if I had the same problem with the unmodified example code, and it did not exhibit the problem. So, looking deeper what I found was server discovery was ocassionally finding another Phidget22 server and opening it. When I specifically set the code to an IP Address, it works fine. My guess (until I dig deeper) is somehow in adapting the discovery code I was not properly passing the serial number to the discovery routine.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests