Hello, I am using Labview, and have working code built and on the robot. works fune, but the control lag can range anywhere from atleast .5 sec up to 4 seconds. I was wondering if anyone else was getting this problem or knew a solution
Also side note, please post multiple questions/solutions at a time because it makes it easier on my part for the testing standpoint to try many theories/solutions at once instead of trying one, responding and then waiting for another response. Very much thanks ahead of time!
Are you running in debug mode or are you building and running as start-up?
Do you have waits or delays somewhere in your loop(s) that look for joystick/control input?
Make sure you don’t have any fast-running loops eating up CPU time. There was an issue in one version of the 2010 Robot Project where the loop that blinks the cRIO light didn’t have a delay where it needs one.
build, then run as startup.
no loops, that i can think of
1 joystick for motor control
1 joystick to control a solenoid and a seperate motor
What is the whole deal with the Firmware updates and CAN id’s? What is the difference/issue in using 2 old and 2 new for controlling the drive motors
I get this problem all the time, when debugging totally new segments of previously un-run code or heavily modified code.
The major cause is an error somewhere. I had the fun experience just yesterday while migrating code from the test vehicle to the real robots, forgetting to change a few resources (specifically, solenoids that were on Spikes are now on Solenoids). Every time the WPI lib gets an error, it logs it and sends it to the DS, which takes time. Times 2 for two Refnum Gets, plus the wait 33ms for the loop time, and it was enough to trip the watchpuppy on the drive motors. What did work was very very laggy.
A quick look at the Diagnostic tab showed me that there were errors coming in, the VI that caused the error, and the call chain.
It was helpful data, but in this case I would much rather ignore the error since it completely incapacitates the entire drive system.
Clear the errors and run your code again, to see what the Dashboard gives you in the Diagnostic tab.
I occasionally get something about a loop not working fast enough or going fast enough in “robot frive” but, as of now, I have no loops in my programming, except for the periodic tasks, which are currently empty
On the wtachdog note, I currently have deleted it in its intirety from my code becuase it wasn;t being fed, but at the same time it was. then when it eventually was fed, it would get a little spritz of not fed error. no watchdog, no more error.
also even before, when i was running with watchdog w/no errors, i was having control lag
Sorry for not posting this earlier, but we discovered that using a Windows Vista laptop as the driver station computer results in control lag. I don’t know if this could be the source of your lag, but it’s definitely something to look into if you are not using a Classmate computer.