Darrel,
Thank you!
I can't believe I didn't catch that one. I noticed the truncation, I even have it display the calculated results yet I never noticed the ns per cycle number being way off...
I don't think the error in the timeout calculation would have ill effect in real life but I changed it to:
#define MB_Frame_Timeout_ns #v((100000000 * 11 / MODBUS_BAUDRATE) * 35)
Thanks, as always it does help a lot.
/Henrik.
Bookmarks