Announcement

Collapse
No announcement yet.

Running 2 cameras in Labview

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running 2 cameras in Labview

    Is it possible to run 2 cameras in Labview? For example one for targeting boiler & 1 for targeting gear placement. Would you be able to see both on your dashboard at same time?

  • #2
    Re: Running 2 cameras in Labview

    Welcome to the FIRST Forums!

    Yes, this is definitely possible. You may notice that the default LabVIEW Dashboard for 2017 does indeed have a camera pane on the left as well as a 2nd camera pane as one of the tabs on the right (with corresponding controls for each at the bottom of the panes).

    On the Robot code side you will need to do a Camera Open on each camera you want to stream. There is an open for one camera attached to USB 0 in Vision Processing.vi, you would duplicate how this code is set up for a second camera set to USB 1. You could either do this in the Vision Processing VI (if you plan to process the images on the roboRIO) or you could move the existing Open and settings to Begin.vi and add your new code there. Regardless, if you are streaming two cameras, you will likely want to rename the refnum for the existing camera to be more descriptive than "Camera" (the input to the last VI before the while in Vision Processing).

    The streaming itself is handled by the VI you see near the bottom of Robot Main. All you should have to do once you have the Camera Open and Set Refnum in your code is to select the camera from the dropdown on the Dashboard.

    Please note when using multiple cameras that you will want to be careful to keep the resolutionframerate down to avoid saturating either the USB bandwidth (the most common cause of errors when opening the 2nd camera) or the network bandwidth.

    If you have further questions or are getting hung up on any specific sections of what I have outlined above, let me know and I can try to add some images.
    FIRST®
    FRC Robotics Engineer

    Comment


    • #3
      Re: Running 2 cameras in Labview

      thank you

      Comment


      • #4
        Re: Running 2 cameras in Labview

        How do i do the part with the send to the pc can you respond quickly i have a competition in a couple of days

        Comment


        • #5
          Re: Running 2 cameras in Labview

          Originally posted by danevenson13 View Post
          How do i do the part with the send to the pc can you respond quickly i have a competition in a couple of days
          Hi, welcome to the FIRST Forums! Unfortunately I don't really understand the question. You should not have to do anything with the Send To PC VI and I did not reference it in my previous post in this thread.
          FIRST®
          FRC Robotics Engineer

          Comment


          • #6
            Re: Running 2 cameras in Labview

            I tried this but both screens were black or the second camera worked sorry for being a noob can you maybe post a picture please thank you
            Last edited by danevenson13; 02-27-2017, 09:35 PM.

            Comment


            • #7
              Re: Running 2 cameras in Labview

              If you had two cameras available to select from the dropdown then you implemented the robot side code correctly. You may need to reduce the resolution and/or framerate specified in the camera opens in order to get both to work within the available USB bandwidth.
              FIRST®
              FRC Robotics Engineer

              Comment

              Working...
              X