Determination of Code Execution Overhead Delay
I am currently testing the control of motor speed, pages 82 and 83 or Robotics with the Boe-Bot.· Both tests include in timing a "Code Overhead Delay" of 1.3 and 1.6 ms, which is a significant fraction of the total servo operating times.· How were these numbers arrived at?· Were·either estimated from the code execution times for the one and two loops or measured?
Comments
If you have a Logic Analyzer (the ANT-8 is a very nice, USB-based one) you can do a couple of 'PULSOUT' commands -- one before and one after the sequence you want to measure and get a 'hard' number for the 'overhead'.
But I don't understand how 1.2 mSec is a "significant fraction of servo operating time". A servo can't move 1000 times a second. You COMMAND it every 20 mSec, but usually it takes several command cycles for the servo to move to the commanded position. And the Servo is pretty flexible in that 20 mSec too -- it can be as much as 50 mSec before it makes any difference to the servo movement.
Larry C.