|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
[FTC]: A useful VI I created
Here is a subVI I created that i thought would help out anyone using labVIEW
I created it to be used to take the 12 boolean wires outputted from "FTC Read Controller.vi" and convert them from 12 true/false variables, to a binary number, to a base 10 number that you can connect to a case statement to do things such as stop when no buttons are being pressed or do an action when a certain combination of buttons is pressed. It comes with a small guide to help you understand how it is getting its output number and ultimately avoid a lot of unnecessary programming. Button Config Outputs: Controller Button - Binary Output - Base 10 Output 1 - 000000000001 - 1 2 - 000000000010 - 2 3 - 000000000100 - 4 4 - 000000001000 - 8 5 - 000000010000 - 16 6 - 000000100000 - 32 7 - 000001000000 - 64 8 - 000010000000 - 128 9 - 000100000000 - 256 10 - 001000000000 - 512 11 - 010000000000 - 1024 12 - 100000000000 - 2048 Add the Base 10 Outputs together to make a specific combination of buttons to be pressed for your case structure Lets say you want an action to run when you press the buttons 5, 7, 11 and 12, you would add the base 10 values from each button (16+64+1024+2048) together to make the value: 3152 Please leave any questions or comments on this |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: FTC]: FTC Champ Tournament - Ontario (Scoring Breakdown) | Mr. Lim | FIRST Tech Challenge | 2 | 03-03-2008 11:54 |
| [FTC]: [FTC]: Ontario Provincial FTC Start/End Times | cbhl | FIRST Tech Challenge | 8 | 16-12-2007 13:37 |
| What is the most benefitial technological advance ever created? | Koko Ed | Math and Science | 28 | 05-05-2005 22:52 |
| New Website being created ! | mtaman02 | IT / Communications | 25 | 26-01-2005 03:37 |
| Sensor Warning-Lighting is not created equal | Adam Y. | Technical Discussion | 9 | 09-01-2005 18:30 |