FRC LabVIEW: Autonomous Mode Motor Doesn't Run Continuously

Updated Feb 12, 2018

Reported In

Hardware

  • roboRIO-FRC

Software

  • LabVIEW

Issue Details

I have added a few motors to the Autonomous Independent.vi as I did to the Teleop.vi.  However, the motors I added only run for a split second before they stop in autonomous mode.  In teleop mode, I am able to run the same motors continuously without issue.

Solution

In Begin.vi there are two things we can do involving WPI_MotorControlSafetyConfig.vi to make sure our motors work:
  • Enable your Safety Config, but set the timeout to a value slightly larger than the period of time you want the motor to run without you writing new values to the motor. (Eg: If our autonomous code has action steps that that have max delays of 5 seconds for our drive and we want this specific motor to be able to run during that 5 seconds, then we will need a timeout larger than 5 seconds.
  • Do not enabled Safety Config for your non-drive motors.  The non-drive motors need to be set to Disable for Safety Config, otherwise they will automatically go into a safe state if commands are no sent to them often enough.  

WAS THIS ARTICLE HELPFUL?

Not Helpful