Go to Post For all of you thinking three alliances... how big of a pain would it be to have three different bumper colors? - Jon Stratis [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
  #5   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
 


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 20:27.

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