![]() |
Programming Digital Inputs from Driver Station
Has anyone had success programming a digital input connected to the driver station? The "Get Digital Data" vi shown in the FRC Programming Guide doesn't seem to be in our updated version of Labview.
We tried the Get DI vi, and indexed the array, but we can't seem to make the connection work to anything that takes a boolean input. Any tips? |
Re: Programming Digital Inputs from Driver Station
I use windriver, but you might be having the same problem as I was. We had a push button switch (2 inputs) wired to the signal and ground inputs. The driver station doesn't have a "pull down" function, so the switch read 0 when pushed and output random numbers when not pushed. To fix this, you have to wire a 100k resistor between the signal and +5V connectors by the switch. Or, you can use a single pole double throw switch. Hope that helped.
|
Re: Programming Digital Inputs from Driver Station
Quote:
|
Re: Programming Digital Inputs from Driver Station
We're trying to get a boolean return from the VI that's reading that switch.
|
Re: Programming Digital Inputs from Driver Station
Try using the VI that actually is meant for the driver station.
Inside LabVIEW, right click and go to WPI Robotics Library->DriverStation->Get Digital Input.vi Try that, that is what we use and it works. You have to use this Lib for any input on the driver station. |
Re: Programming Digital Inputs from Driver Station
Have you read the update that instructs you to ground your grounds to the DS box itself?
I was having trouble getting the correct inputs from the Digital Inputs as well before I added resistors to my switch to elimate the sensitivity issue. I assume the update solves this problem but don't quote me on that. |
Re: Programming Digital Inputs from Driver Station
We have not been fully able to test it, because we have not setup the pull-ups for the Digital Inputs. But I think the way you can program the DS in LabView is:
1. Grab the DS Get Digit Input Vi put it in the program. 2. Grab an Array to Cluster function, and put it to the right of the DS Get Digit Input Vi. 3. Wire the boolean array output of the DS Get Digit Input Vi to the input of the Array to Cluster function. 4. Grab an unbundle by name function, and put it to the right of the Array to Cluster function. 5. Wire the output of the Array to Cluster function to the unbundle by name function. 6. The outputs of the unbundle by name function are now boolean values, not a boolean array. The unbundle by name identifies, by name, the digit inputs. Let me know if it works. |
Re: Programming Digital Inputs from Driver Station
Update:
Thanks for the first tip about wiring the resister in. Once we did that, we connected it to our digital sidecar and it worked perfectly! I just tried the tip about using the Driver Station-> Get Dig In VI, clustering the array and then unbundling it. For some reason, it always sends out True, even when my switch is off. Anyone else experience this or have a fix? Thanks to everyone for their help and suggestions! Sean |
Re: Programming Digital Inputs from Driver Station
Nevermind! Switch was installed backwards. We're all set. Thanks again to everyone!
Sean, Team 126 |
| All times are GMT -5. The time now is 07:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi