Go to Post Ooohh!! Fire!! - dlavery [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 09-01-2013, 19:26
Ganondalf Ganondalf is offline
Registered User
FRC #4665
 
Join Date: Jan 2013
Location: Minnesota
Posts: 48
Ganondalf is an unknown quantity at this point
Programming a Victor motor (Logitech Joysticks)

Hello, I have a victor motor and what I want to do is have the trigger on my right joystick spin the motor one direction and the trigger on my left the other. I'm using two joysticks (tank drive). How would I do this using LabVIEW. Thanks in advance!

Allons-y!

Last edited by Ganondalf : 09-01-2013 at 19:37.
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2013, 19:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming a Victor motor (Logitech Joysticks)

This doesn't have everything wired, but it might give you the idea.
You have to open the motor in Begin.vi, name it, and use both the motor and joystick names in Teleop.vi.
Attached Thumbnails
Click image for larger version

Name:	buttonDrive.png
Views:	32
Size:	12.2 KB
ID:	13437  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 09-01-2013, 19:38
Ganondalf Ganondalf is offline
Registered User
FRC #4665
 
Join Date: Jan 2013
Location: Minnesota
Posts: 48
Ganondalf is an unknown quantity at this point
Re: Programming a Victor motor (Logitech Joysticks)

That'll do it! Thanks!
Reply With Quote
  #4   Spotlight this post!  
Unread 09-01-2013, 19:42
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Programming a Victor motor (Logitech Joysticks)

Make sure that in Begin.vi, you open a reference to both joysticks and store them by name. By default there is only one being opened. Also make sure to open the motor controller and store it with a name.

In TeleOp, retrieve the refnums using the names and run code similar to below.

The code uses the select node to choose a value depending on the state of the button, and when it is time to combine the button values, I simply added them, deciding that if both are pressed, don't spin the motor at all. I decided to spin the motors at half speed, so I use 0.5 and -0.5.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Clipboard 1.png
Views:	21
Size:	54.5 KB
ID:	13438  
Reply With Quote
  #5   Spotlight this post!  
Unread 09-01-2013, 19:47
Ganondalf Ganondalf is offline
Registered User
FRC #4665
 
Join Date: Jan 2013
Location: Minnesota
Posts: 48
Ganondalf is an unknown quantity at this point
Re: Programming a Victor motor (Logitech Joysticks)

Thank you so much!
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 21:51.

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