![]() |
Labview Invert Motors with Push of Button
Hey all,
I'm starting to work on the programming for this year's bot on our old robot. We plan on using an arcade drive for the new bot, and the old one also has an arcade drive. This year we are thinking of having the ability to invert the drive system when a button is pushed. Basically switch forward and back. The system would work where the robot would be operated like normal moving the joystick forward/back/left/right, but when a button is pushed and held down, it inverts the motors swapping forward and backward. I tried this before by making two of the same drive configurations in the begin.vi, but one having a different name and opposite true/false values on the inverts. Then in teleop.vi, I made a case structure with the joystick on the outside. I took button 7 and wired it to the case structure. When the case was false I put my original drive configuration in, and when true put the new one in. The code ran, but didn't work as planned. When the button was not held down, and the joystick was moved, nothing occured with the robot. No wheels moving. But when the button was held, the motors spun. How can I go about doing this? Any help would be greatly appreciated. Thanks |
Re: Labview Invert Motors with Push of Button
Might be a good idea to post either the VI in question and/or a screenshot of said VI.
I'm not a LabVIEW guy myself, just noting that we'll need to see what exactly you are looking at. |
Re: Labview Invert Motors with Push of Button
Quote:
|
Re: Labview Invert Motors with Push of Button
1 Attachment(s)
You would not need to use 2 separate configurations. In the teleop VI, you would put a switch statement between the joystick and the motors. then you would connect a button to the switches. similar to the screenshot below
|
Re: Labview Invert Motors with Push of Button
Quote:
|
Re: Labview Invert Motors with Push of Button
Quote:
|
Re: Labview Invert Motors with Push of Button
Quote:
Thanks all you guys! |
Re: Labview Invert Motors with Push of Button
Quote:
|
Re: Labview Invert Motors with Push of Button
Quote:
|
| All times are GMT -5. The time now is 01:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi