Hello Guest it is May 17, 2025, 12:50:08 AM

Author Topic: Arduino ModBus MPG problem  (Read 29618 times)

0 Members and 1 Guest are viewing this topic.

Re: Arduino ModBus MPG problem
« Reply #10 on: January 16, 2025, 02:01:19 PM »
hi
i don't do anything with the MPG tickcount
I have MPG steps multiple selected, I don't use or pass through the A-B pulses i count them in my Arduino
the count is then passed over modbus to the MPG1 count value.
Everything just works and I dont loose any counts between Arduino and Mach3.
If I really spin the MPG fast then obviously you will loose counts when the pulses are changing faster than the Arduino processor can scan them. But you would never use an MPG like this anyway.
hope this helps
regards
Servomac
Re: Arduino ModBus MPG problem
« Reply #11 on: January 16, 2025, 11:13:04 PM »
Thank you for your response. I asked because I also noticed that the MPG_Tickcount value is completely unnecessary, yet my MPG still works correctly and efficiently. I’m wondering whether I calculated the MPG_Tickcount incorrectly or if it’s simply not needed. I calculated the MPG_Tickcount value as follows:
MPG_Tickcount = (Number of encoder pulses counted within 100ms) * 10,
because I understand that the unit sent to Modbus for Mach3 needs to be pulses per second.