When analysing the list of sources of errors, I had to investigate what matters to get the router bit in the right position.
So I drew some sort of flow chart showing what I thought the firmware functions must consider to control the router XYZ position.
First sketch is about XY position. Here you can see the motor power input (starting with the PWM box), ending in two directions: first the updated encoder counts, second the router (or sled) position changing while hung at the chain tips. Note that the frame geometry is part of another section not shown here.
Note: Left motor details omitted for clarity.
And here is my sketch for the Z position. Similar to the first one, but more involved into the router bit position:
For the Firmware to control the XYZ position, it has to operate motors by generating power signals (PWM) and listen to encoders step counts to monitor a movement estimation of the router bit.
As you can see in the sketches, there are a few details involved into going across direction #2 from shaft rotation to router position.
That is a simplified view of the MaslowCNC reality: Sketches do not include the effect of workspace surface interactions (router bit cutting forces, sled friction, material flatness).