FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit switch stop all motors !

I have another, for me, when the limit switch is activated, all motors stop. I follow the tutorial in http://www.frcmastery.com/labview-for-frc/2011-frc-steps-to-robot-success/step-4 -add-a-digital-inpu... but i added only déclarations into "Begin.vi" and into "Finish.vi" and nothing in "Teleop.vi". Does anyone have any suggestion ?

Team 3969.

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

From the link you provided I suspect you need this step:

"Modify the Teleop SubVI to replace the momentary joystick button with a limit switch"

What is the desired functionality for your robot? To Stop all motors when the limit switch is activated? In that case you will need to put a case structure in teleop which sets the speed of all your motors to 0 when the limit switch is activated.

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

No, my problem is even I don't add to labview any program the limit switch stop all motors !

I want to stop only one motor (desired) not all.

0 Kudos
Message 3 of 5
(2,982 Views)

I think in ithat case you will just need to add a case structure which reads the state of the limit switch and sets that desired motor to a speed of 0. If you need help with the motor control pallette take a look at the Basic Motor Control Tutorial on the documents page of this community.

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

Hi,

We found the problem that was with the wiring, now it works perfectly.

thank you.

0 Kudos
Message 5 of 5
(2,982 Views)