02-16-2019 10:47 AM
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.
02-16-2019 10:58 AM
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.
02-16-2019 05:48 PM - edited 02-16-2019 05:51 PM
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.
Then select the cleanup button in the menu bar.
It becomes much more readable
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
02-20-2019 12:28 PM
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?
02-20-2019 01:04 PM
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.
02-20-2019 01:18 PM - edited 02-20-2019 01:22 PM
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.
02-20-2019 01:48 PM
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.
02-20-2019 02:56 PM
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!
02-20-2019 02:58 PM
Thank you very much for the tutorial direction. We have learned everything we know by these tutorials.