View Single Post
  #8   Spotlight this post!  
Unread 04-04-2013, 14:03
apm4242 apm4242 is offline
Registered User
FRC #4242
 
Join Date: Jan 2013
Location: United States
Posts: 83
apm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud of
Re: HELP - Dashboard Digital Inputs to Select Autonomous Modes

My previous post requires an update -

In the Labview code, the Build Array function shows 3 inputs. It should only be 2. The Build Array and Boolean Array to Number functions output integers using binary math. Therefore, the first 2 switches could result in a maximum of 4 total modes - 00, 01, 10, and 11. From the Labview help: "If you wire an array of two Boolean values to this function and neither value is TRUE, the function returns a value of 0. If the first Boolean value is TRUE, the function returns 1. If the second Boolean value is TRUE, the function returns 2. If both Boolean values are TRUE, the function returns 3."

And just so that it's clear, the first switch corresponds to the rightmost digit. For example, if the Driver Station Digital Inputs read On, Off, Off, the Build Array function will return 001 and the Boolean Array to Number function will return "1".
Reply With Quote