I got a warning message in the DS that said Teleop was running to slow. I know exactly why this is happening, I just want to know if doing this to Teleolp would speed it up.
All of the DevRef’s are bundled and put into a global.
Then I unbundled the DevRef’s in an infinite loop inside a Teleop Independent VI I created.
This VI is placed in Robot Main, just like Periodic Tasks.
Will doing this make it run normally?? Thanks!
That could run normally, but I doubt it will change the error messages. The default teleop is more event based, running when a new joystick packet comes in. Presumeably, the new way would read the joysticks as fast as possible and update the motors. I can’t tell from what you posted.
The issue causing the messages is probably in a parallel loop already. Perhaps vision. I would suggest measuring what is running at what rate before making such a radical change.
In the project, there is a Support Folder that contains the elapsed times VI. If you drop it into a VI or a loop, you can leave the panel open and see how long between runs. Be sure to open the charts tab on the DS and watch the CPU usage too. Keep in mind that open panels with lots of updates adds CPU overhead.
Determine the appropriate rate for various loops and watch for untimed loops that are running far faster than needed.
If vision is on, you may want to change the Framerate in Begin to get the CPU usage down a bit.
Please post if you find things or need more suggestions.