|
I put a line in the code right after the RUN LED toggle line to set a relay output = the inverse of itself
and put a digital scope on the (middle ?) pin of the relay output.
I was surprized to see the period of the resulting toggling signal is about 20 Hz (goes high, goes low)
BUT the duty cycle is NOT 50% - the HI and LOW times were something like 16.6mS and 33.4mS - very consistantly
so the average cycle frequency for 2 cycles is 40 Hz, but individual passes through the code happen at a rate of 60Hz and 30Hz.
I have no idea why this is.
I also have noticed, if you program a toggle switch on the robot switch inputs to control an LED on the operator interface - there is a NOTICABLE delay from when you throw the switch until the LED goes on.
I did not measure it with a scope -but Im guessing its a quarter second at least. If this is true the other way too - that it takes a quarter second for inputs at the operator interface to reach the relay or PWM outputs on the robot, that would be interesting.
It would mean the robot doesnt respond very quickly to operator commands. I will test this 'system propagation delay' with the digital scope sometime when Im not swamped with other tasks.
|