Programing a Digital Input on the DS in Labview

I have been searching the forums on CD for quite some time now with now luck to my question… In labview how to you program a simple digital switch on your DS (wired into the extra digital and analog inputs on the right side) to just run a motor at “x” amount of speed until the push button is released?

I may have just simply overlooked the function in labview but i can’t seem to find it…

Can anyone help me out with this? Is there a demo video online explaining how to do this?


The functions are found in the Block Diagram Functions under WPI Robotics Library -> Driver Station
Or do a search in Functions for

Ok thanks!

I don’t see how i missed that…

Although I can’t seem to figure out how to set what digital input I am looking at?

I see the pin where is says “Driver Station Digital Input (1-8)” but what goes there? a constant? or do i need to wire that to a different block?


Off the top of my head I think it should be a constant just like you used for motors etc. In this case it would probably just be the pin number you want instead of a port and pin.

The DS Get Digital Input VI outputs a boolean array of length 8. You can wire it to an Index Array to get the individual values. The attached picture should output the first 2 digital inputs, and the last one (remember an array of n elements goes from 0 to n-1), as boolean indicators on the VI front panel.



Boy I have some catching up to do here. First of all, what is the difference between the Joystick.Get.Vi and the Joystick. GetRaw.Vi? They seem to be pretty much the same. What I’m trying to learn is how to use a Joystick button to control the state of a motor; ie. hold down a button and the motor goes forward. I’ve got the motor control figured out, I’m just lost on how to get it wired to the Joysitck Vi. Any guidance would be much appreciated :slight_smile:

Basically the difference is integer vs floating point. Get Raw returns an 8 bit integer of range -128 to 127. Get returns a 32 bit floating point of range -1 to 1.
Are you trying to use the Relay VIs to control the motor?