ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Motors programming problem

Hello!

I programmed my 3rd motor for my robotic's arm but all I can do with a button on my Logitech Attack 3 joystick is to make it function one way. I want to be able to program it to use another button to reverse the motion.

Thank you!

0 Kudos
Message 1 of 5
(5,229 Views)

Hey,

You should be able to just get multiple buttons out of the joystick (using an unbundle by name block).

I posted two screenshots showing the general idea of how this could be used. Post back if you have any questions.

joystick1.png

joystick2.png

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 2 of 5
(4,085 Views)

Yes! Know the only problem is , how do I use Button1 to make my motor go forward and Button 2 to make it go backwards? I tried to put button 2 with an output of a negatif DBL but doesn't work...

0 Kudos
Message 3 of 5
(4,085 Views)

You should be able to set it such that button 2 causes your third motor to have an output set to a negative number between 0 and -1 with -1 being full reverse. What is not working when you use a negative double?

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 4 of 5
(4,085 Views)

It working now, the problem came from the DB37 Ribbon Cable. I folowed the instructions from DB37 Ribbon Cable Assembly - Rework Instructions.

Thank you for your help.

0 Kudos
Message 5 of 5
(4,085 Views)