FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I define a RefNum Registry Set Vi

How do I define a RefNum Registry Set Vi and Get Vi for a second Joystick and a motor other than what is in the default code.

      Thanks

           Bob


0 Kudos
Message 1 of 3
(4,052 Views)

I think you'll find the videos at frcmastery.com very helpful in learning LabVIEW and how to manipulate the FRC framework.

0 Kudos
Message 2 of 3
(2,873 Views)

Hi Bob,

To define a RefNum for another Joystick, just add another instance of the Joystick.lvlib:Open.vi and Joystick.lvlib:RefNum Registry Set.vi in the Begin VI. Change the JoystickDevice input to something other than USB 1 and change the refnum name to something other than Joystick 1 (like Joystick 2). This creates another reference that is specific to the your second joystick.

Set Registry.jpg

In your Teleop VI add another Joystick.lvlib:RefNum Registry Set.vi and wire in the same refnum name (Joystick 2) that you had used in the Begin VI.

Get Resitry.jpg

0 Kudos
Message 3 of 3
(2,873 Views)