Go to Post At IRI you have 72 of the best teams in the country. It could literally be held in a cornfield in the middle of Indiana and nobody would care, because the competition is simply that good. - Cory [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 13-01-2009, 09:42
Shivang1923 Shivang1923 is offline
I make robot go VROOM VROOM!
FRC #1923 (MidKnight Inventors)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: West Windsor, NJ
Posts: 38
Shivang1923 has a spectacular aura aboutShivang1923 has a spectacular aura about
Re: More than boolean Case Structure...

I think I can explain it...if not then this is how I did it


There is a box in LabView that is called Joystick.Get. From there wire a "unbundle by name" to the button output. Then from there make the unbundle by name box the right size (i.e. shows 3 buttons if you want 3 of them) and then click each one and select the button you want from the dropdown menu. Make a Boolean to array box, and wire each button into a separate input (resize as needed). Then wire the output of that into a case statement.


now the boolean to array converts trues and falses into binary numbers.

example
....................______
Button 1------|........| CASE STRUCTURE
Button 5------|........|------[?]
Button 3------|_____|


if button one is pressed, then the output of the boolean to array will be 1
if button 5 is pressed then 2
if button 3 then 4
if one AND five then 3
etc.

So you have a 0, Default (should be made automatically) for nothing pressed or for some value that isnt specified...(in example if 5 and 3 pressed or 1 and 3 pressed)

and then the rest of them you stick in the number you want. so

CASE STRUCTURE
<|0,Default|>
<|1 |> button 1 pressed
<|2 |> button 5 pressed
<|3 |> button 1 and 5 pressed
<|4 |> button 3 pressed


note: all button numbers represent those on the joysticks included in the kit...trigger being button 1

if I have misnamed anything, I am sorry cause im in school right now and I dont have labview open to check the names.
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2009, 15:41
Nimrod Beker Nimrod Beker is offline
Thunder-Bolts Porgramming Team
FRC #2630 (Thunder-Bolts)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Israel
Posts: 7
Nimrod Beker is an unknown quantity at this point
Re: More than boolean Case Structure...

Wow thanks, if think that what ive looking for ..
ill try it later in the robot class..
i think this would solve it but keep generate ideas
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2009, 11:05
Chaos in a Can Chaos in a Can is offline
Joel Spadin
FRC #1736 (Robot Casserole)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Peoria, IL
Posts: 58
Chaos in a Can is an unknown quantity at this point
Send a message via MSN to Chaos in a Can
Re: More than boolean Case Structure...

As Kevin suggested, you can also have a control with more than just on/off.

If you can set this up as a list of options rather than a number of buttons, create a ring or enum control and wire it to the case structure. Fill the control with all the possible cases, and you can create a case in the case structure for each choice in the enum/ring control.
__________________
2006 Xerox Creativity Award
2007 General Motors Industrial Design Award
2008 Judges' Award
2009 Chrysler Team Spirit Award

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CRio more than nationals lenny8 FRC Control System 6 16-11-2008 12:33
More than One Regional? smurfgirl Regional Competitions 35 26-03-2008 14:21
More than 1 autonomos... Jimmy_Team7011 Programming 5 16-03-2008 15:33
more than 4 ir controls? Vanquish Programming 2 12-01-2008 14:52
Robowarriors: More visited than CD! Tim Arnold General Forum 11 26-10-2007 11:54


All times are GMT -5. The time now is 07:35.

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