Go to Post Coming to MTV this fall: Pimp my Segway - Francis-134 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-01-2012, 16:10
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 08-01-2012, 16:21
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
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.
__________________
Aren't signatures a bit outdated?
Reply With Quote
  #3   Spotlight this post!  
Unread 08-01-2012, 17:24
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Labview Invert Motors with Push of Button

Quote:
Originally Posted by JBotAlan View Post
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.
I just left our workplace a little while ago. I can post it sometime tomorrow when I get back there.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-01-2012, 17:26
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,099
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Labview Invert Motors with Push of Button

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
Attached Thumbnails
Click image for larger version

Name:	button switch.PNG
Views:	84
Size:	8.9 KB
ID:	11295  
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-01-2012, 17:47
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Labview Invert Motors with Push of Button

Quote:
Originally Posted by sst.thad View Post
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
That is extremely helpful. But how would I make the button invert the motors?
Reply With Quote
  #6   Spotlight this post!  
Unread 08-01-2012, 17:50
3p1c w1n 3p1c w1n is offline
Registered User
FRC #1529
 
Join Date: Jan 2010
Location: Indianapiolis
Posts: 53
3p1c w1n is an unknown quantity at this point
Re: Labview Invert Motors with Push of Button

Quote:
Originally Posted by jhellr13 View Post
That is extremely helpful. But how would I make the button invert the motors?
it looks like in the picture that if the button is pressed (true) that the values coming from the joystick are multiplied by -1.
__________________
~Team 1529 Cybercards~
Reply With Quote
  #7   Spotlight this post!  
Unread 08-01-2012, 17:53
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Labview Invert Motors with Push of Button

Quote:
Originally Posted by 3p1c w1n View Post
it looks like in the picture that if the button is pressed (true) that the values coming from the joystick are multiplied by -1.
Yea I realized that after I replied already. I'll try this tomorrow and let you all know how it works.

Thanks all you guys!
Reply With Quote
  #8   Spotlight this post!  
Unread 08-01-2012, 18:00
3p1c w1n 3p1c w1n is offline
Registered User
FRC #1529
 
Join Date: Jan 2010
Location: Indianapiolis
Posts: 53
3p1c w1n is an unknown quantity at this point
Re: Labview Invert Motors with Push of Button

Quote:
Originally Posted by jhellr13 View Post
Yea I realized that after I replied already. I'll try this tomorrow and let you all know how it works.

Thanks all you guys!
please do, this in a great idea and I'm planning on implementing it as well on this years' bot.
__________________
~Team 1529 Cybercards~
Reply With Quote
  #9   Spotlight this post!  
Unread 08-01-2012, 18:02
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Labview Invert Motors with Push of Button

Quote:
Originally Posted by 3p1c w1n View Post
please do, this in a great idea and I'm planning on implementing it as well on this years' bot.
Yea it's a smart idea. My friend thought of it yesterday as it would increase our driving efficiency. It is basically so when we want to pick up balls we can drive in the direction the slot will be rather than driving backwards.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi