FIRST Robotics Competition Discussions

Showing results for 
Search instead for 
Did you mean: 

FRC 2017 USB Camera not working with LABView


Hey Jun,

Yes, I will put together a post specifically on the dual camera. I just moved my office over the weekend so I should be able to work on this again this evening. 

To get it to work with the least amount of effort; make sure you configure the cameras similar to what I did in the Dual Cameras.jpg file in my previous post (check your USB port settings and your camera names)

On the Driver Station, set both cameras down to the minimum resolution and set one down to 4 frames per second. Then wait a bit. For me it took about 30 seconds for both streams to start and stabilized. 


The reason I haven't put a full post on this is that I am trying to come up with a better (more stable) way of displaying both cameras.

Good luck!


0 Kudos
Message 11 of 20

Thank you, Frank and Ryan for your quick reply! We can see the image from one of two USB cameras, but not both at the same time. Maybe we didn't wait for 30 seconds for the second image to show up.  Waiting for Ryan's new post about this topic. Thanks!


0 Kudos
Message 12 of 20

Hi JunWu46,

I was having problems with displaying 2 usb camera's at the same time. What i did is change the screen size to the smallest on the dashboard and it fixed it.

0 Kudos
Message 13 of 20

Thank you, RoboticsRocks!  Finally I was able to see images from both cameras at the same time by setting the resolution to the lowest level and the FPS to 4 or so.  It is nice to see it finally working.  I am just wondering if it is practical with this very low resolution and FPS setup in real competition. It seems to me that it does need camera switching mechanism to use one camera at a time with relatively high resolution and FPS.

0 Kudos
Message 14 of 20

Ok, guys... I have messed with this over a couple of days and only have two items to test...

My conclusion so far is that two cameras with low resolution to start and bump up to where things are stable is about as good as you can get with the bandwidth limiting (this is one thing I still need to check, I have the bandwidth limiting enabled right now) that we have to deal with. 


The other thing I am going to try is to "stream" the images like the IP cameras, to see if I can control the stream better. 


Using the method RoboticsRocks mentioned with the addition of setting the initial conditions in the Vision as well I have been able to get my two USB cameras to consistently run. Once I have them running I mess with resolution and frames per second to find a good happy point. I was then able to take these settings and use them as the defaults with good results as well. 


JunWu46, your question about how practical is it with low resolution and FPS... It all depends on how you are planning on using the cameras. if it is just a driver aid then it may be enough (and if they practice with it like that even better) but if you want to use it for vision processing then I would say it is not enough. A large part comes down to our match time is very short and most drivers will only look at the screen if they have practiced doing it and there is a very good reason to. 


I hope this helps.




0 Kudos
Message 15 of 20

Hello R^2, 

My team and I are trying to have two cameras display simultaneously but when we run the code we get errors. We tracked down some of the errors, with image size but had no further luck. Can you please explain what you did? Did you change any of the preset dashboard code?


Thank You 

0 Kudos
Message 16 of 20

The source of our cameras not working appears to be problems with MDNS not working or not working as expected.

If you look on the variables tab of the dashboard, you can see the setting for where Camera0 will stream from.  We were experiencing an IP address of  To override this, we did 3 things:

1) modified the initialization of the Camera0 variable in the SendCameraImages2PC vi (found on the Begin vi code window).  Instead of doing IPToString and StringToIP calls, we just forced our robot team string as the input "roborio-XXXX-frc"  where XXXX is the team number.

2)  Set our roborio to a fixed IP address using Microsoft Explorer and silverlight to configure it to 10.XX.XX.5.  We also set our laptop ip address to a fixed ip address of 10.XX.XX.2 using Win7, Network and Sharing Center, Change adapter settings.

3)  Put and entry in windows HOSTS file for the roborio.  Hosts file is in \windows\system32\drivers\etc and must be edited by an administrator.

The entry is "10.XX.XX.5 roborio-XXXX-frc"


Setting it up this way allowed us to run over etherent cable or wirelessly in our lab and also worked fine at our local practice event.  Be sure to tell the field crew you are using a fixed IP address.


Hope this helps.

We have not taken the time to figure out our MDNS problems, but heard at our pratice event that some other teams were having MDNS problems too.

0 Kudos
Message 17 of 20

Hi Ryan,


Can you post your code? We need  a starting point of non default code that works to help us separate code issues from network issues.



Champion CLA Instructor

Making senseless computers do
intelligent real world things
is NOT easy. SO MAKE IT FUN!
0 Kudos
Message 18 of 20

  Enabled the camera in and set as default.   Built-deployed, and reboot.  Still no camera selections to choose from.   What am I missing?


Thanks very much


0 Kudos
Message 19 of 20
0 Kudos
Message 20 of 20