OCCRA
Go to Post By "resources" do you mean money (sponsor or school), school support or permission, build facilities, or mentors? All of these require different solutions. - Carol [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Events   CD-Media   CD-Spy   FRC-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 02-01-2011, 07:59 PM
jhellr13's Avatar
jhellr13 jhellr13 is offline
Registered User
FRC #1751
 
Join Date: Jan 2011
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Basic LabVIEW Arcade Drive Program

My team is starting to get anxious to drive our robot around to get a feel. We are only slightly experienced with labview, so we need a little help. I was wondering if someone could make a diagram to drive in arcade mode. We have 2 motors for each gear box, thus 4 jaguars. If anyone could help me here, that would be greatly appreciated
Reply With Quote
  #2   Spotlight this post!  
Unread 02-01-2011, 08:20 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Itinerant Programmer
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: 7,256
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: Basic LabVIEW Arcade Drive Program

The default code is Arcade Drive.

It comes setup for 2 motor drive though, so you need to change that.
  1. Create a Default Framework
  2. Open Begin.vi, then the block diagram
  3. Locate the Open 2 Motor icon.
  4. Right-click on Open 2 Motor and go to Replace -> All Palettes -> WPI Robotics Library -> RobotDrive and choose Open 4 Motor
  5. Delete the two PWM settings left over. There's a reason, really.
  6. Add constants for all four input nodes and set them to your other two motors. Okay so you're adding back the two PWMs you just deleted--there really is a reason.
  7. Right-click on each of the PWM inputs, go to Visible Items -> Label and let go. The name of the input will appear and you might want to drag it to the left side of the PWM constant. The reason for deleting the old PWMs was the labels would get updated.
  8. Set the PWMs to match where your 4 motors are.
  9. Create constants for the two Inverted nodes on the bottom of the Open 4 Motor icon.
  10. Set both the motors on one side of the robot be Inverted. If you guess wrong and the robot drives backwards instead of forwards, just go back into the code and reverse which side gets Inverted.
  11. Save, Build & Run as Startup
    • In the Project Explorer window, at the bottom, you'll see Build Specifications. Expand that and you'll see FRC Robot Boot-up Deployment
    • Right-click on FRC Robot Boot-up Deployment and choose Build
    • Turn the robot on and connect to it
    • Right-click on FRC Robot Boot-up Deployment again and choose Run as startup
__________________
Deduction is limited by knowledge, and knowledge is limited by preconceptions

Last edited by Mark McLeod : 02-01-2011 at 08:27 PM.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-01-2011, 08:27 PM
jhellr13's Avatar
jhellr13 jhellr13 is offline
Registered User
FRC #1751
 
Join Date: Jan 2011
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Basic LabVIEW Arcade Drive Program

Thanks for the explanation, it really helps. Does it matter what the constants are? and also could you just explain the whole pwm thing to me, i am a little confused about them.
Does this default code work with the joystick automatically? If not, how do i configure that?
Reply With Quote
  #4   Spotlight this post!  
Unread 02-01-2011, 08:34 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Itinerant Programmer
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: 7,256
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: Basic LabVIEW Arcade Drive Program

The constants that appear need to be changed, but that's easy.
If you put the cursor over each one 'til it turns into a little hand, then you can left-click and you'll get a list to choose from.

The PWMs are the numbered motor outputs on the Digital Sidecar. They are the white 3-pin contacts that you plug the tri-color PWM cables into. One end of a cable connects to the PWM and the other end connects to a Jaguar (or Victor).
So in the code you're telling it which numbered PWM pins will drive which motor.


The joystick is already setup to drive the robot.
You can look to see how that's all handled in the teleop.vi block diagram.

If you get stuck I can come for a visit. I was just down at Connetquot tonight.
If you have your laptop that's giving you LabVIEW activation trouble I could take a look at that, too.
__________________
Deduction is limited by knowledge, and knowledge is limited by preconceptions

Last edited by Mark McLeod : 02-01-2011 at 08:37 PM.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-01-2011, 08:38 PM
jhellr13's Avatar
jhellr13 jhellr13 is offline
Registered User
FRC #1751
 
Join Date: Jan 2011
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Basic LabVIEW Arcade Drive Program

Great. Thanks for the help
Reply With Quote
  #6   Spotlight this post!  
Unread 02-02-2011, 12:55 PM
jhellr13's Avatar
jhellr13 jhellr13 is offline
Registered User
FRC #1751
 
Join Date: Jan 2011
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Basic LabVIEW Arcade Drive Program

I will probably be able to figure it out. In reference to that labtop, I deleted everything on my computer related to ni and labview. I am gonna get the kop disc and do a clean install
Reply With Quote
  #7   Spotlight this post!  
Unread 02-02-2011, 02:30 PM
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Send a message via Skype™ to IisMathwizard
Question Re: Basic LabVIEW Arcade Drive Program

did you uninstall NI or personally delete it.
__________________

jRIO 2013 Project
Reply With Quote
  #8   Spotlight this post!  
Unread 02-02-2011, 08:35 PM
jhellr13's Avatar
jhellr13 jhellr13 is offline
Registered User
FRC #1751
 
Join Date: Jan 2011
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Basic LabVIEW Arcade Drive Program

Quote:
Originally Posted by IisMathwizard View Post
did you uninstall NI or personally delete it.
I uninstalled NI, and did a search for national instruments and labview on my hard drive and deleted the contents
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 04:26 PM.

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


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