04-28-2014 11:59 AM - edited 04-28-2014 11:59 AM
Hi,
I'm having a problem where a call to IMAQdxDiscoverEthernetCameras(..) will occasionally hang my application. It appears that the function call never returns, requiring the user to go into Windows Task Manager and kill the application. This problem, from my observation, is very sporadic, but there are reports from the field that some deployed systems are seeing it upwards of 50% of the time. Here's what I know:
My only idea at this point is to try walking the NI IMAQ driver versions up and seeing if it goes away. However, the problem is sporatic enough and without a repeatable test it's that it's hard to say that a new driver version has fixed the issue or if it's just temporarly gone away. And the NI Vision Acquisition packages are so large that I don't want to just tell people to try installing a new version unless I have some confidence that it will actually solve the problem. Any thoughts? Thanks in advance for any help.
04-30-2014 08:46 AM
As an update I believe that this is caused by the function call hanging when the network adapter(s) go into power saving mode. It only happens after the computer has been powered on and running for a while with no network activity. If I generate some network activity (say, using the ping command in the command prompt to ping a dummy address) before running my application it seems to work. I modified my application to call InetPing(..) before calling IMAQdxDiscoverEthernetCameras(..) and so far on the one deployed PC I have access to that has shown this issue it has not repeated.
04-30-2014 01:03 PM
Hi tstanley,
I have been unable to find anything regarding others experiencing this issue, and I'm mostly at a loss for what to do, other than to update the drivers. It's interesting that you seem to have isolated the issue to your network adapter's power saving mode. I don't know how this could be creating the issue, but it seems plausible given that you would be using this adapter with the function. It also seems to run in line with your observation that this happens with laptops and not desktops.
Unfortunately, if your hypothesis is correct, this seems like it's more of a hardware issue. But possibly we could find a work-around. I'm thinking this could be in the form of a programmatic ping being sent before the call to IMAQdxDiscoverEthernetCameras, to ensure that power saving mode is off. Or if there is some programmatic way to tell the status of the network adapter.
Anyway, just a couple ideas. Let me know if you've tried updating the drivers and if you have any more updates.
05-02-2014 11:24 AM - edited 05-02-2014 11:24 AM
For clarification, you are calling the DiscoverEthernetCameras function with a specified timeout (say ~10 seconds). If the network adapter goes into power saving mode, it will hang and not return even after reaching the timeout?
05-05-2014 07:44 AM
Yes, the issue is that the function call to IMAQdxDiscoverEthernetCameras(..) hangs and never returns. As such, from the user's perspective the application is stuck and they have no other option but go into Task Manager and kill the application.
I ended up adding a function call to InetPing(..) immediately before the call to IMAQdxDiscoverEthernetCameras(..) and so far, the issue has not cropped back up. Thus, the issue has been "solved". I would like to try updating the drivers, but since the ping fix seems to be working (so far) on the deployed machines there is some reluctance to making other changes for the sake of experimentation. Though if I do get a chance to try updated drivers I can post another update.