View Single Post
  #7   Spotlight this post!  
Unread 25-01-2011, 15:00
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,112
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: 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?
Reply With Quote