Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Basic LabVIEW Arcade Drive Program (http://www.chiefdelphi.com/forums/showthread.php?t=90736)

jhellr13 01-02-2011 20:59

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

Mark McLeod 01-02-2011 21:20

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

jhellr13 01-02-2011 21:27

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?

Mark McLeod 01-02-2011 21:34

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.

jhellr13 01-02-2011 21:38

Re: Basic LabVIEW Arcade Drive Program
 
Great. Thanks for the help

jhellr13 02-02-2011 13:55

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

IisMathwizard 02-02-2011 15:30

Re: Basic LabVIEW Arcade Drive Program
 
did you uninstall NI or personally delete it.

jhellr13 02-02-2011 21:35

Re: Basic LabVIEW Arcade Drive Program
 
Quote:

Originally Posted by IisMathwizard (Post 1014262)
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


All times are GMT -5. The time now is 10:14.

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