Quote:
Originally Posted by kws4000
How would I set the Digital Mode? Looks like I have to bundle a cluster with values attached to it, but what values?
Also, would setting the Digital Mode for [9-16] to Input instead of Output allow me to extract more from the GetEnhancedDigitalInput VI?
|
Setting the digital mode is done with the Enhanced Set Digital Config VI. As with lots of WPILib, if the summary description doesn't make sense, the most obvious way to determine how it works is probably to open its panel. The attached image shows that there are sixteen selectors with options generally of Input (high, low, or floating), Output, and sometimes other functions such as PWM (first four channels), or Analog comparator (last two channels). If you right click on the terminal of the original icon and create a control or constant, it will bring along all of those enum selectors. You can also copy/paste it to the calling diagram. As mentioned in the other post, you can also do this once on a DS, and it will save the settings to its ini file and use them the next time. If you have a shared DS, the robot config may make more sense, but otherwise, I'd probably do the DS, since it is the closest to the Cypress board and the rest of the driving switches, etc.
To extract data from the digital inputs, you use the Get Enhanced Digital Input VI, and it returns an array of sixteen values. There can be up to sixteen inputs. If you haven't configured a pin to be an input, then the value for that position is not all that useful and may in fact be misleading.
Greg McKaskle