Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   How to add extra Jaguars to code (http://www.chiefdelphi.com/forums/showthread.php?t=89962)

CNettles11 24-01-2011 16:04

How to add extra Jaguars to code
 
We need to program an extra Jaguar to run the motor for our manipulator using LabVIEW. Are there any .VI's that are good to use/edit for this? Are there any tutorials? If you have a solution please reply.

Thank you.
-Team 3556

Alan Anderson 24-01-2011 16:41

Re: How to add extra Jaguars to code
 
Isn't "simple motor control" one of the provided examples? I don't have LabVIEW for FRC handy, so I can't walk you through it, sorry.

CNettles11 24-01-2011 17:09

Re: How to add extra Jaguars to code
 
Hmm, I'll try that and let you know.

theNerd 24-01-2011 19:09

Re: How to add extra Jaguars to code
 
Quote:

Originally Posted by Alan Anderson (Post 1007314)
Isn't "simple motor control" one of the provided examples?

I can confirm this. In fact there are multiple of ways that you can control a Jag with. You can either use the Drive Motors VI or the Motor Set Output VI. The latter would be the most useful to your purpose if I understand it correctly - that is you just want to control only one Jag. These are located in the RobotDrive sub tools panel in the Advanced section. Just follow the context help and it should set you straight.

CNettles11 24-01-2011 19:51

Re: How to add extra Jaguars to code
 
we copy+pasted all the drive motor code and set it up where it would control the manipulator motor as the left drive motor.

We're basically just trying to control 1 motor with 1 jaguar and 1 joystick, using only the X-axis. Both axes are alright if we need to use them.

CNettles11 25-01-2011 14:23

Re: How to add extra Jaguars to code
 
We're still stuck, any help at all will be appreciated!

Alan Anderson 25-01-2011 15:00

Re: How to add extra Jaguars to code
 
Look at the Motor Control Example in LabVIEW. Things to the left of the loop correspond to the Begin of a robot project. Things inside the loop correspond to Teleop. Things to the right of the loop correspond to Finish.

Put a Motor Open vi in Begin and wire constants to its DIO Module and PWM Channel inputs to define which Digital Sidecar output you want to connect the motor controller to. Use the selector below it to tell it whether you're using a Jaguar or a Victor. Wire the resulting MotorControlDeviceRef output to a Motor Refnum Set and give it a name that represents what it does.

In Teleop, put a Motor Refnum Get with that same name and wire its output to a Motor Set Output vi. The Output input (yeah, weird name, but whatever) should be wired to whatever you want to use to control the speed of that motor.

In Finish, put another Motor Refnum Get and a Motor Close. You'll see where to place them by looking at everything else in Finish.

Does that help?

CNettles11 26-01-2011 21:55

Re: How to add extra Jaguars to code
 
Thanks for all your help, we've got it working now.


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

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