Mach depends on the controller to send machine position information. This is done at startup and any time the machine is moved outside of Mach's direction. Homing is a motion controller function, so the controller must update Mach with the new positions after each axes has been homed and call an API function called mcMotionSync(). This synchronizes the controller's position to Mach. Mach will then use that position to plan any future trajectories. If The controller then follows the trajectory movement data, both mach and the controller should have the same notion of the position after the trajectory has been executed. Meanwhile, the position DROs are showing what the controller is reporting.
There are times that Mach may synchronize the planner positions to what the controller is reporting. One such instance is when the user presses cycle start to run MDI or a file. Mach takes the last reported position from the motion controller and updates its' planner with that position.
Mach runs on Windows, so the positions can never be updated in real-time. The real-time portion of the system can be the motion controller or the digital servo drives. For analog servos, the position loop is closed on the controller (A Galil, for instance). If the following error is too great, the controller should shut things down and inform Mach. For digital servos, the position loop is closed on each drive. If the following error is too great, the drives must fault to inform Mach that there is a problem executing the movements. For a stepper system, well... that is open loop anyway.
Mach will never keep a following error, so there will never be secondary security. Because Mach depends on the motion controller to update the positions. Mach doesn't know if they are correct, it just accepts them. But secondary security isn't needed because the primary security of the motion controller/drives should be what everything else depending on. It the motion controller detects a following error that is too great or the drives fault out because of a following error, the rest of the system will stop.
Steve