Go to Post I thought we agreed to just put up a teaser, not a picture of the robot! - IBdrummer [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 31-01-2016, 18:14
teku14's Avatar
teku14 teku14 is offline
http:
FRC #2614 (MARS)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Morgantown, WV
Posts: 64
teku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the rough
Re: Switching between two webcams on the dashboard

So I followed the instructions and didn't have success although its most probably because I didn't follow the instructions correctly. I'm posting the changes I made below and maybe you could point out where I went wrong.

Starting with the robot code, If I understand this correctly, the Camera Background VI just houses the Send 2 PC VI and you can ignore everything else if the camera is run over USB. So the first thing I did was make a modified version of the Send 2PC VI or as its called WPI_CameraSend Images to PC VI.
https://drive.google.com/open?id=0Bw...ngwNDJrd1pHM2M
In it, I the changed the port number constant wired into the TCP Listen VI to a control named "port". This was originally just set to 1180. Then I changed the Image Name Constant going into IMAQ create VI into a string control as well whereas it was originally the WPILib_SendtoPCImage you were referring to.

I named this VI as "Sketchy Send 2 PC" just to keep track of changes but you can see that I placed this directly onto the vision processing VI.
https://drive.google.com/open?id=0Bw...G1VUVZNWFJVODg
Originally the set of set up VIs associated with "USB 1" was not there as shown below. I just branched the single original camera reference into to two separate "Sketchy Send 2 PC" VIs while maintaining the same parameters that you see in this image being 2 different port numbers 1180 and 1179 (I'm not very familiar with so I just used 1 number less thinking it to be legitimate) and then "WPILib_SendtoPCImage A" and "WPILib_SendtoPCImage B" for the two VIs Respectively. When this, along with the other changes didn't work, I made the change that you see in the image where I'm opening two separate Camera References.

Next in the Dashboard, I made the following changes:

Starting from the Camera Loop (Loop #2) and going further in

Essentially, Just modifying each concentric VI to change the 1180 TCP port constant at the bottom most level, to something that I can change on the dashboard while its running.

https://drive.google.com/open?id=0Bw...lctRkJ4QVF0R2s
https://drive.google.com/open?id=0Bw...nRrd2hhRTg2aG8
https://drive.google.com/open?id=0Bw...jhMNE5fSTkxdVE

At the end of this, I the code is still able to recognize and display one USB camera but cannot change the display to the second one whenever I bump the port number on the dashboard (while its running) between 1180 and 1179. It just stays on the same original camera. I cannot tell which camera I have assigned port 1180 or 1179.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi