FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Motors running when enabled

We have two mechanisms that are controlled by motors. As soon as we enable the robot, the motors are coming on instead of waiting for the correct button to be pressed. Any ideas? The students are working on the programming laptop, but are sending me pics. I will post them as soon as I get them.
On a side note, we are also getting error 44061 on the dashboard. This was not happening before either.

Download All
0 Kudos
Message 1 of 9
(4,402 Views)

A student just found the problem of the motors running crazy. That problem is not fixed, but our joysticks are so delayed because of the error. Any ideas on the error?

Error: 44061:"The loop that contains robot drive is not running fast enough. This error can occur if the loop contains too much code or if one or more other loops are starving the drive loop.

0 Kudos
Message 2 of 9
(4,400 Views)

The images of the code are very hard to read so I can't tell if there is something mis-wired. 

 

There is a way to have LabVIEW help you clean up your code so it is easier to read. If you select the code block that you want to clean up by drawing a box around it.

select.png

Then select the cleanup button in the menu bar.

Slect cleanup.png

It becomes much more readable

clean code.png

 

One thing I did notice is the first image 0964 Labeled Ball Motor and the second image 0965 Labeled Arm Motor are both writing to the Ball Motor. It would not explain your problem but it is worth pointing out.

 

Can you post the project or more information so we can help further?

 

Mark

Champion CLA

Making senseless computers do
intelligent real world things
is NOT easy. SO MAKE IT FUN!
0 Kudos
Message 3 of 9
(4,379 Views)

You are getting the runing too slow error because you have too much code in your teleop loop. Can you show a picture or attach the snippet of the code so we can see what you have going on in your teleop loop?

Tim
GHSP
0 Kudos
Message 4 of 9
(4,360 Views)

We have everything in teleop because we are new to this and do not know what else to do with it. We are open to suggestions. Crazy thing is, we are no longer getting this error. 

0 Kudos
Message 5 of 9
(4,357 Views)

OK one of the first things I see is that you are calling the joystick 0 and 1 vi's multi times. You should only call them one time and then use the index array to the the right button for each thing you are trying to control.

 

Next I would move non time critical vi's to the timed tasks vi. That should located on the main diagram. I would move the ball motor and arm motors there. I would also move the solenoids there. You can add a loop and read the joystick values in that loop. again you only need to read the joystick values one time. 

Tim
GHSP
0 Kudos
Message 6 of 9
(4,353 Views)

Good that you're not getting the error anymore, you might checkout 

 

http://www.frclabviewtutorials.com/tutorials/producer-consumer/

 

For a walk-through on moving sub-systems (actuators in particular) into Time Tasks.

 

0 Kudos
Message 7 of 9
(4,340 Views)

Thank you for the information and suggestions. I will pass this on to the students and we will see what we can learn and do with it. We did attempt to put a loop of code in the periodic tasks, but when we tried it we did not get the correct result. Thankfully, one of my kids who have taken on this task is as stubborn as I am. We will get it thanks to the many of you who monitor these forums. We appreciate you all very much!

0 Kudos
Message 8 of 9
(4,333 Views)

Thank you very much for the tutorial direction. We have learned everything we know by these tutorials.

0 Kudos
Message 9 of 9
(4,332 Views)