Go to Post If we can transform our culture to the point where girls swoon over guys as they pull their dremel off their belt and carve some speed holes in a smooth fluid motion, I think FIRST is half way to its goal. When we get the guys to swoon over the girls for their hot moves on the 5-axis, we have won. - EricVanWyk [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2012, 21:47
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Toggle between two cameras

I've just wired the value of the joystick being unflattened to the value Vision, which created an orange wire. Will this work for me?
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2012, 22:37
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Toggle between two cameras

Quote:
Originally Posted by DominickC View Post
I've just wired the value of the joystick being unflattened to the value Vision, which created an orange wire. Will this work for me?
Probably not. Instead, right-click the Value input and create a constant to it. Create another copy of this constant, and then make sure that each one is set to the tab you want. Then, you can use use the Select function (or case structure, or any other way you want) to choose between the constants.

Hope this helps!
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2012, 22:44
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Toggle between two cameras

Ah, NOW I get it! Thanks Alan, Greg and NeatNit!
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2012, 10:04
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Toggle between two cameras

I have never tried to open a joystick connection in multiple apps using DirectInput, which is what the DS uses.

I'm leaving town in an hour, so I'll describe it and I look forward to hearing the results.

In the LV dashboard project code, try using the Connectivity>>Input Device functions to open a joystick and read back the buttons. Please note that these VIs aren't quite as flexible as the stuff used for the DS, so once you open a connection, it is not possible to reposition the USB port of the joystick until the DLL leaves memory. This shouldn't be an issue except during development when it causes head-scratching.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 15-06-2012, 12:34
4085's Avatar
4085 4085 is offline
Technical Difficulties
AKA: Sebastian Brosious
FRC #4085 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Reynoldsburg, Ohio
Posts: 14
4085 is an unknown quantity at this point
Re: Toggle between two cameras

Hey i found this intresting i just programmed a second camera in and got it within the tabs, Dominick, can you please show me how you programmed in the toggle between the two cameras. With pictures please :/ help please and THANK YOU. Pm me if you can
__________________
_______________________________________________

WE ARE...

Raiders!

Last edited by 4085 : 15-06-2012 at 17:30.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-06-2012, 08:58
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Toggle between two cameras

I'm going to run with the assumption that you've got a second camera running in an additional "Camera" tab.

First, you'll need to pass a boolean from a joystick or some other input to the DS. This is done via "High Priority User Data".

Then, on the block diagram, right click on each of your "Viewer" icons, then navigate to Create>>Property Node>>Value. You'll have to change each of these property nodes to write by right clicking on them.

Take the boolean you received and create a case structure. In the true case, wire the "Camera Image" enum to the first viewer property node. In the false case, wire the remaining enum to the second viewer property node.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	27
Size:	6.7 KB
ID:	12831  
Reply With Quote
  #7   Spotlight this post!  
Unread 16-06-2012, 17:04
4085's Avatar
4085 4085 is offline
Technical Difficulties
AKA: Sebastian Brosious
FRC #4085 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Reynoldsburg, Ohio
Posts: 14
4085 is an unknown quantity at this point
Re: Toggle between two cameras

Thanks for your help!
__________________
_______________________________________________

WE ARE...

Raiders!
Reply With Quote
  #8   Spotlight this post!  
Unread 16-07-2012, 20:30
MAldridge's Avatar
MAldridge MAldridge is offline
Lead Programmer
AKA: Rube #1
FRC #0418 (LASA Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Austin
Posts: 117
MAldridge will become famous soon enoughMAldridge will become famous soon enough
Re: Toggle between two cameras

Quote:
Originally Posted by Greg McKaskle View Post

In the LV dashboard project code, try using the Connectivity>>Input Device functions to open a joystick and read back the buttons. Please note that these VIs aren't quite as flexible as the stuff used for the DS, so once you open a connection, it is not possible to reposition the USB port of the joystick until the DLL leaves memory. This shouldn't be an issue except during development when it causes head-scratching.

Greg McKaskle
I actually tried that back during the competition season when I needed to halt vision output while the robot had the shooter spun up, when I did it, I got a slew of errors. The first of which was the lack of an 'lvinput.dll' (or similar, can't remember what it was beyond that it was accompanied by an error code). At the time, I attributed this to two pieces of software wanting the same hardware, and a slightly foggy mentor (who was recovering from a head injury) agreed. We scrapped it and reworked the dashboard to have a key binding that could toggle vision on and off.

I would say that the easiest would be to get some kind of proxy driver that would let you make two software joysticks out of one software joystick, but that's me. I am firing up labview now, and I will give it a try using this method again.
__________________
'Why are you a programer?' --Team Captain
'Because the robot isn't complicated enough!' --Me
Reply With Quote
Reply


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 11:44.

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