Go to Post Adversity should be seen as a challenge and not as an obstacle. :D - waialua359 [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 18-01-2012, 18:49
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Programming Logitech Extreme 3D Pro

Hey, I was wondering if I was able to program the small turning knob on the joystick (with + and - sign)? I want to use it as a throttle control for my shooting motor. My thought was, for example, that if I turned the knob to the halfway position my motor would be limited to that max speed even if I pushed fully on the joystick. If it is possible could someone help me with how i would go about this?
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2012, 19:01
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Logitech Extreme 3D Pro

If you mean the throttle axis, then yes this is possible to use this in the robot. Your question is a bit confusing though. Did you want to throttle your shooting motor, or the robot drive. I am not sure why you would use the joystick x/y axes for the shooter.

In terms of solutions; you only have to multiple the throttle axis with the desired axis or numerics chosen by a button press. I believe the output of the throttle is between 0 and 1, and therefore directly applicable as a percentage of range. (decimal form)
__________________
Mike B
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2012, 20:12
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Logitech Extreme 3D Pro

Yeah, I'm using it to control the shooter, but for the Extreme 3D Pro joystick, axis 3 is the twist axis of the joystick, so I don't know what I would use for knob.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2012, 20:47
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Logitech Extreme 3D Pro

Have you verified that axis? I have used the wireless version of that, and I thought that the throttle was on axis 3. If you have verified that your throttle is actually a different axis, the WPI library supports up to 6 axes. You simply have to use the axis that is suitable. (Maybe number 4?)
__________________
Mike B
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2012, 21:07
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Programming Logitech Extreme 3D Pro

I'm pretty sure we have that same joystick. The throttle is axis 4, and it goes from -1 to 1. We added 1, divided by 2, then multiplied our other three axes by it (hint: multiplying a cluster of floats by a float works well)
Reply With Quote
  #6   Spotlight this post!  
Unread 19-01-2012, 11:10
Doc543's Avatar
Doc543 Doc543 is offline
Electrical, Pneumatics, Driver
AKA: Eric
FRC #1891 (BullBots)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Meridian Idaho
Posts: 63
Doc543 is an unknown quantity at this point
Re: Programming Logitech Extreme 3D Pro

we used one of those joysticks last year to drive our mechinum drive. The left right is 1, the forward back is 2, the rotation in the stick is 3, the throttle is 4.
__________________

"Its just a prototype."
2011 Chairman's Award Utah Regional
2010 Gracious Perfectionism Utah Regional
2009 Gracious Perfectionism Portland Regional
Reply With Quote
  #7   Spotlight this post!  
Unread 19-01-2012, 16:53
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Logitech Extreme 3D Pro

Yeah we confirmed that axis 1 is the x-axis, axis 2 is the y-axis, axis 3 is the throttle which is the twisting of the joystick and axis 4 is the knob like switch at the bottom. My question is how would I program that axis to be used as a speed limiter? For example if I set that knob at a certain position, even if I press fully forward on the joystick, the motor won't be able to go over a certain speed thus creating a speed limiter. If anyone can help me do this in LV it would be much appreciated.
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 19-01-2012, 18:47
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Programming Logitech Extreme 3D Pro

Quote:
Originally Posted by nickcvet89 View Post
My question is how would I program that axis to be used as a speed limiter? For example if I set that knob at a certain position, even if I press fully forward on the joystick, the motor won't be able to go over a certain speed thus creating a speed limiter. If anyone can help me do this in LV it would be much appreciated.
Are you having trouble figuring out an equation (or algorithm) to use to perform the speed limit. Or do you already have an equation that you are having trouble translating to LabVIEW?
Reply With Quote
  #9   Spotlight this post!  
Unread 19-01-2012, 21:15
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Logitech Extreme 3D Pro

I'm having trouble with the equation and actual program of this limiter. I have no clue where to start.
__________________
Reply With Quote
  #10   Spotlight this post!  
Unread 20-01-2012, 00:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming Logitech Extreme 3D Pro

There is a function in LabVIEW called "In Range and Coerce". You can use the value of the throttle knob as the "maximum" input of the function, and use its negation as the "minimum" input if you want. The coerced output will follow the function's input, but will be limited to always be no lower than the minimum and no higher than the maximum.
Reply With Quote
  #11   Spotlight this post!  
Unread 20-01-2012, 03:18
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Logitech Extreme 3D Pro

Quote:
Originally Posted by Alan Anderson View Post
There is a function in LabVIEW called "In Range and Coerce". You can use the value of the throttle knob as the "maximum" input of the function, and use its negation as the "minimum" input if you want. The coerced output will follow the function's input, but will be limited to always be no lower than the minimum and no higher than the maximum.
This will work, but well make a hard limit. The other solution post a few times makes a soft limit, applying the limit linearly across the whole a axis. There are reasons to use either. Your drivers may have an opinion on which way you pick.
__________________
Mike B
Reply With Quote
  #12   Spotlight this post!  
Unread 20-01-2012, 11:41
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Logitech Extreme 3D Pro

Thanks for the help so far, I was thinking would we be able to wire a potentiometer to a bread board and use that instead of trying to use a joystick for this function? If possible how would I program it to interact with the motor?
__________________
Reply With Quote
  #13   Spotlight this post!  
Unread 25-01-2012, 23:31
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Logitech Extreme 3D Pro

Quote:
Originally Posted by nickcvet89 View Post
Thanks for the help so far, I was thinking would we be able to wire a potentiometer to a bread board and use that instead of trying to use a joystick for this function? If possible how would I program it to interact with the motor?

I am not sure if you mean on the robot or driver station. If you meant the driver station, this wouldn't be very easy, and a joystick would make much more sense.
If on the robot, then it is a bit easier, but I still don't recommend it. It would add complexity to the robot wiring/programming, (depending upon how it would be used) weight, and not be adjustable during a match. Again, I suggest sticking to your original idea of a joystick axis. If you want something more difficult to modify while in use, you could always use a custom dashboard with a throttle slider on it.
__________________
Mike B
Reply With Quote
  #14   Spotlight this post!  
Unread 26-01-2012, 00:49
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming Logitech Extreme 3D Pro

Quote:
Originally Posted by nickcvet89 View Post
Thanks for the help so far, I was thinking would we be able to wire a potentiometer to a bread board and use that instead of trying to use a joystick for this function? If possible how would I program it to interact with the motor?
The Cypress board will work for connecting a potentiometer to the Driver Station. In the simple "compatible" mode, you can read up to four analog inputs and use the returned value to govern your motor speed.

You don't even have to use a physical potentiometer if you don't want to. The Driver Station has an I/O tab that lets you set the value of a virtual analog input, which the robot can read as if it were a real analog value.
Reply With Quote
  #15   Spotlight this post!  
Unread 26-01-2012, 01:44
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Logitech Extreme 3D Pro

Quote:
Originally Posted by Alan Anderson View Post
You don't even have to use a physical potentiometer if you don't want to. The Driver Station has an I/O tab that lets you set the value of a virtual analog input, which the robot can read as if it were a real analog value.
Thanks for mentioning this, I had completely forgotten about those.
__________________
Mike B
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 22:29.

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