Tank Drive with Advanced Framework in Labview

i have successfully implemented a tank drive system with the basic robot framework in labview, but i have not been able to do so with the advanced framework. i am still having a little bit of trouble understanding where all of the variables are stored in labview, in particular the “joystickdevref”. i figured out how to add a second reference for my second joystick in the global variables vi, but it won’t change to USB2. after i change it, save it, close it, and reopen it, both references say USB1 again. does anyone know what my problem is? also, can you explain exactly what the joystickdevref variables are?

You have to open it with jostick=>open - otherwise you just have an empty variable, essentially. The space is reserved but you need to initialize it with joystick=>open and stick its output joystickdevref into there.

-jonathan

Where/how do you open it with joystick->open? We can’t seem to find it. Thanks in advance.

There is a sidebar with all the robotics vis etc as well as labview functions - access it from View->Functions Palette when in block diagram or right click.

joystick-open is under WPI Robotics Library->DriverStation->Joystick.

-jonathan

Look for where the existing joystick is opened in Teleop.vi.

In Teleop.vi the case structure has:
– An “Init” section where the joystick open’s are done
– A “Stop” section where the joystick is closed
– An “Execute” section where the joystick gets used