
Purple

Hi EZ Robot, I have an issue that crept into my project. Everything was going fine then a lag of about one second appeared. I tried two different V3 boards and I think that I can rule out the boards. It appears in the manual controls for the PWMs and the script. I put the project up for someone to take a look at. Thanks in advance.
Upgrade to ARC Pro
Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!
Ill check it out when im home.
Also, Using graphs, or anything like that, that requires on the fly visual rendering, has the potential to bog down a PC. Even a brand new PC unless it's one of those souped up gaming PCs is going to have issues with rendering lots of things at once. To find out how much is too much is going to be a trial and error process with your set up. Everyone has a different set up in regards to the specs of the PC they use for their projects so no one can put a definite number on that for anyone..
But, I'm still leaning towards a power issue. What are you using for power?
The V3 board runs on bluetooth and therefore the bandwidth of the comms between the EZ-B and the PC is limited. If you are checking the EZ-B ADC ports 6 times every 100ms it's going to place a demand on the comms which will slow down the responsiveness of ARC (it'll wait there until it gets the info it's asked for). The comms is a huge bottleneck with the V3.
Try reducing the time the ADC graphs check the ports to see if that helps at all.
The V4 has faster comms and even on my V4 the benchmark shows I get 8.85 commands per second when reading ADC which was much better than my V3 benchmark. You are requesting 4 every 100ms and 2 every 500ms, that totals 44 commands per second which is 5 times what my V4 can read.
Run a benchmark (control in Project, Add, General) and see what your benchmark for reading ADC is, then adjust the times to be below that.
I know it doesn't help but it does validate what your saying. Sorry.
@ Rich I see you are getting 8 ADC reads per second. I get about 25 on my new computer. On my old vista computer running XP I got 17 per second. I was surprised to see that much of a drop in v4s Get ADC execution time, maybe it has to do with the higher resolution.
I know that I am pushing the v3 to areas that most don't go to, as far as adc requests/graphs and speed of the script loop. My intent is to rewrite and move this portion of my project to one of the "other" boards for speed after I develop it in the ARC enviornment, which is working great for the development part. Then I can have the other board handle the high speed data collection and then have the EZb v3 or my v4 (in July I hope) handle the major portion of the program. Think of a robot that has to do balance or a helicopter etc., you would need to get position data and execute commands very fast, I think faster than the EZbs can go. I hope I am thinking correctly on this plan of mine, I would welcome any input/ideas on this. Thanks again
So long story short, EZ-Robot is also about learning and education with a fun result of having an amazing robot. Managing your resources part of the learning fun
As dave mentioned, slowing down the sample rate of a GET command is ideal for sharing resources. In script, I recommend SLEEP() within a loop when sampling ADC data.
If you are using the ADC Graphs, they are pretty but very resource hungry. Be careful how many you use, and how you are using them.
Either way, you are still requesting ADC values 44 times per second which is higher than your benchmark of 25 per second. Also, as others have mentioned, the graphs are resource hungry.
Personally I write scripts, loop them with a sleep of 1000ms or so (depending on what's being monitored) and have the script Print() the results. This way the script control will continue to update with the ADC value but wont be anywhere near as resource hungry. Check my Battery Monitor Example for example scripts that check the ADC and Print() the results.
Always run your own benchmarks as they will all be different, especially the V4.