Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX Doesn't Reconnect to USB3 Capture Device

 

We recently invested in a couple Pleora U3 HDSDI to USB3 Vision capture devices.  They work extermely well with NI Vision, except when you are plugging and replugging them.  Here is the sequence of events when it fails:

 

To start with I have a U3 plugged in and working.  MAX looks like this:

1.jpg

Now if I unplug it, MAX transitions to this view.  The U3 has disappeared.

2.jpg

 

Now if I replug it in, I get this (the pleora U3 shows back up):

 3.jpg

 

Notice that the u3 isn’t selected (Ni USB-6009 is).  If I select the U3 MAX hangs for about 10 seconds and then returns an error and the below is what I see. I also waited for the lights to stop flashing on the U3 HDSDI (to make sure it's all happy and running) before clicking on it in MAX.

4.jpg

 

So I click OK on the error and I get this status in MAX.  Notice the red “x” circle on the U3 entry.  I can't do anything with the device, its essentially dead to the world.

5.jpg

 

Now if I unplug it, MAX shows it disappear:

6.jpg

 

Now I replug it in I get this:

7.jpg

 

Now when I click on it, everything is working and happy.  It litteraly happens every other unplug and plug in.  You plug it in a single time, doesn't work.  You plug it in a second time and it works.  You plug it in a third time it doesn’t work.  You plug it in a fourth time and it works.7.5.jpg

 

Just to prove I'm not crazy, I will now unplug it and replug it a third time.  See you get the failure:

8.jpg

 

 

On the fourth plug in, MAX crashed.  It usually doesn’t do this, and I think it was because I left the error window open when I replugged in the U3.  For what it’s worth  I usually close it before replugging in.    When I restarted MAX it opened the U3 just fine.

9.jpg

 

For grins, I tried opening and closing the camera in LabVIEW to see if this is a MAX issue.  With the U3 working in MAX, I closed MAX and wrote a little LabVIEW program to open the U3 and close it.  Here is the code:

 

10.jpg

And when I run it, I get no errors:

11.jpg

 

Now if I unplug and replug (not opening MAX at all) and when the lights on the U3 stop blinking I run my little program.  In this case the U3 opens and closes just fine with no errors. If I open MAX up after running this, it opens the U3 just fine. This makes me believe it may be some interaction with MAX and the Pleora device.  I've worked with the engineers at Pleora and they don't think it is on their end, and wanted me to expore this being an NI problem.  Soooo, am I crazy or is this a known issue?  Are there any work arounds other than telling my production techs to unplug and replug untill it works everytime they install a new one?

 

FYI, We are running Vision 2016 on all our PCs and this is with MAX version 15.3.0f0

0 Kudos
Message 1 of 12
(4,905 Views)

Hi, 

 

This issue sounds suspiciously similar to another USB3 Pleora issue we had. In that case though, it seemed to only affect systems running Windows 8 or later. What version of Windows do you have?

 

It might be worthwhile to try that registry key work-around I posted in the other thread and see if it resolves the issue. It seems odd to me that it would only affect the MAX case and not LV. Please give it a shot and let me know if that helps. If it is that case, hopefully we could get that resolved on Pleora's end though so you wouldn't have to keep that registry key work-around indefinitely because it could potentially have some other side effects with regards to stopping and starting acquisitions.

 

Thanks,

Katie

0 Kudos
Message 2 of 12
(4,902 Views)

Another thought: Are you always unplugging while the camera is open (selected) in MAX? If so, is the behavior the same if you close the camera and then unplug?

0 Kudos
Message 3 of 12
(4,898 Views)

It does work correctly if you deselect the U3 before disconnecting it (IE select the "Devices and Interfaces" tree control entry).  However,  I'm not happy with that solution since it isn't clear that you have to do that with MAX.  Why doesn't MAX automatically deselect a camera that is selected but drops out of the Device tree?  That makes me think that it's more a MAX user interface implemenation gotcha rather than a hardware error.  Sorry if this is whiney and/or splitting hairs.  I just want my plug and play cameras to be truely plug and play, because if they arn't, I get call out to the production floor to deal with silly bugs like this.

 

I'm not really excitied about implementing the registry key trick in the other thread.  Your post seemed to indicate that it may make the USB3 connection less reliable, which would also be a step in the wrong direction for us.

0 Kudos
Message 4 of 12
(4,896 Views)

Sorry if I wasn't clear on my previous post - The expected behavior for this and all other USB3 Vision cameras is that you should be able to unplug them at any time in any state (open, closed, acquiring, etc.) and never get into a bad state. What you are describing definitely seems like an issue, so I'm asking these questions to get a feel for what might be going wrong. I tried to reproduce this with the Pleora USB3 device I have (iPort-NTx-U3), but could not get it to fail. Since I can't reproduce this here, could you try a few things to narrow down what could be going wrong?

 

1) Can you modify your VI to just do an open and see if you get the same behavior? Since the MAX issue was when you were unplugging with the camera still open, but in LV you were unplugging with the camera closed, I'm wondering if you'd see the same problem if you modify the VI in that way.

 

2) Can you try the registry key change I mentioned? If that change resolves the issue, then it seems like this is the same problem I debugged before, and I'll need to talk to Pleora again and see if they can fix that known bug. If the registry key change doesn't solve the problem, then that will rule out that known issue with Pleora and I can focus more on debugging the NI side of things.

 

Thanks,

Katie

0 Kudos
Message 5 of 12
(4,876 Views)

Just to clarify on point 1 above - in order to truly test unplugging with the camera open in LabVIEW, you'd have to open the camera and put some sort of sleep in the VI so that you unplug the camera while the VI is still running. Otherwise, once the VI stops there will be an implicit close.

0 Kudos
Message 6 of 12
(4,839 Views)

Is this how you want me to test this:

 

Code.jpg

 

 

0 Kudos
Message 7 of 12
(4,824 Views)

Yes, that looks good. Do you see issue in this case?

0 Kudos
Message 8 of 12
(4,822 Views)

OK, so the reg edit fix seems to have improved this immesurably.  Right after I first started MAX I got one of the normal failure to control, but after replugging in the U3, it has never failed since.  I've unpluged and replugged the U3 with MAX open probably 10 times and have had no further failures.  I've also restarted MAX, and it continues to connect just fine even after replugging it in and out. 

 

I've tryed the LabVIEW code. It didn't fail at all either.

0 Kudos
Message 9 of 12
(4,818 Views)

Thanks for trying that out!

 

Since setting that registry key seems to resolve the issue, that points to a problem with how the device is handling our command to reset the control endpoint. When I analyzed Pleora's software before, they do not do this additional step to ensure that the device's control channel is in a good state. For that reason, I suspect that they have not come across this issue in their testing.

 

Are you using the latest firmware? If not, you should update and retest without the registry key work-around to see if you are still experiencing the problem. Since I have already talked to Pleora about a different issue regarding the control endpoint stalling, I sent an email today to follow up about that. I'll let you know if I need any additional information from you to help them debug this issue and reproduce it on their end.

 

I'll post an update once I hear back from them, but hopefully they can resolve this issue with a future firmware release.

0 Kudos
Message 10 of 12
(4,797 Views)