![]() Now, reference your motor (the name has to be exact) in the Teleop.vi using the Motor Control Refnum Registry Get VI and tell it what to do with the Motor Control Set Output VI. (I also included and enabled the Motor Control Safety Config VI, which automatically turns off the motor if it loses connection.) ![]() I named mine “Lift Motor” and connected it to PWM 7. Choose your PWM line and name your motor. These can be found by right-clicking in the block diagram and going to WPI Robotics Library>RobotDrive>Motor Control. If you see the HAND>ARROW>LABVIEW symbol, just drag the image into your block diagram, and voila: code! Ok, here’s how you do it.įIRST, create a motor reference in the Begin.vi, using the Motor Control Open VI and Motor Control Refnum Registry Set VI. These VI Snippets show how to set up a single motor in a project that may already contain a multi-motor drive. Since this motor will not be part of your tank, arcade, or mecanum drive, you’ll definitely want independent control of it. Once your drive that controls the wheels is all set, you might need to add an additional motor to control something completely independent of the wheels, such as an arm. Local and Global Variables in LabVIEW for FRC.How to Use Joystick Buttons to Control Motors or Solenoids. ![]() Adding Safety Features to Your Robot Code. ![]()
0 Comments
Leave a Reply. |