FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent random motor movement

Hi,

I need help with a very odd problem: when teleop is enabled, there is intermittent, random motor movement of the (mecanum) wheels without any kind of input. In the driver station diagnostic log, there is an error code 44061. This implies that our code may be taking too long to execute, but,i nterestingly, an early build that was deployed on the robot works fine, but when I try to run the same revision as the build (not building and deploying), it won't work.

I have tried:

  • Switching to a fully charged battery (solves some motor problems)
  • Reverting to previous revisions of code
  • Reverting to barebones driving code (which works)

I attached the teleop VI revision that is the same as the build version that works. Any ideas on what could be wrong?

0 Kudos
Message 1 of 5
(5,980 Views)

Howdy stjanovitz!

It sounds like the intermittent motor movement you are experiencing could be caused by your Teleop VI taking too long to execute and the MotorDrive VIs timing out.  This tutorial describes the Safety Config features that were added to LabVIEW FRC 2011 and how you can modify the timeout values.

Regards,

Barron

Barron
Applications Engineering
National Instruments
Message 2 of 5
(3,409 Views)

Thanks for the reply Barron!

Increasing the timeout seemed to fix it, but do you know any common things in LV that would greatly increase the VI's execution time?

0 Kudos
Message 3 of 5
(3,409 Views)

The Get Robot Competition Mode.vi has a wait for new message from the driver station (time out is 1000ms).

DS Occurrence.png

If the laptop used for the driver station has too much going on, it could be slow in sending new packets to the cRIO causing your teleop code to run slow.

Omar
0 Kudos
Message 4 of 5
(3,409 Views)

Hey Steve,

You could use the VI profiling tools in LabVIEW to see which VIs are taking the most time.  You can access it by going to Tools>>Profile>>Performance and Memory.

profiler.png

Regards,

Barron

Barron
Applications Engineering
National Instruments
Message 5 of 5
(3,409 Views)