micander / atrias

Automatically exported from code.google.com/p/atrias
0 stars 0 forks source link

LegMedulla code does not always run every cycle #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While running encoder calibration, a printf was inserted into the loop of the 
the leg medulla source file in the ethercat connector. It was found that the A 
leg medulla code ran more often than the B leg medulla code. This should not 
happen and needs to be figured out at some point.

Original issue reported on code.google.com by broodoo...@gmail.com on 8 Sep 2012 at 12:28

GoogleCodeExporter commented 9 years ago
I'll go ahead and document that we think the reason for this is that 
CONTROLLER_LOOP_OFFSET_NS was too small. The microcontrollers seemed to take 
~240µS from when the DC fires to when they're done transmitting to the ET1100. 
We had the offset set at 250µS. The time the microcontrollers take can vary 
somewhat, especially if the 32-bit encoders have varying read qualities.

Therefore, we believe the cause is that the EtherCAT frame would go out before 
the µC finished writing to the ESC. Our fix was to bump up 
CONTROLLER_LOOP_OFFSET_NS to 300µS, but we've not tried testing whether or not 
this actually solves the problem.

Original comment by jrvanwhy on 8 Sep 2012 at 1:13

GoogleCodeExporter commented 9 years ago

Original comment by jrvanwhy on 11 Sep 2012 at 9:47

GoogleCodeExporter commented 9 years ago
As it turns out, the issue was caused by the loss of realtime induced by the 
print statements used for calibration. Closing.

Original comment by jrvanwhy on 3 Dec 2012 at 12:56