Jonathan,
The issue could be related to a number of things:
1) Loose set screws on rack and pinion drives -- I'd check the pulleys on your motors to make sure these haven't vibrated loose. We recommend putting loctite on these screws.
2) PC related issue. If you are running with the parallel port (rather than a Smoothstepper or another separate motion controller), I'd suggest turning off any services (virus scanners, etc) that could interrupt Mach 3. Or purchase a Smoothstepper -- we steer everyone we can towards these units, as they save a ton of frustration caused by Windows and flaky parallel ports.
3) G540 related issue. The G540 runs hot, and without auxiliary cooling can experience issues with lost or intermittent steps. Additionally, I'd suggest moving the "step pulse" and "dir pulse" up to 10 to see if this helps. A number of G540's require longer than normal pulses in order to respond reliably. While this was theoretically being addressed by the manufacturer, we still see a number of drives that experience this issue, and benefit from increases in pulse length.
As always, feel free to call us to discuss and we can come up with a strategy to help you get past this problem.
Ahren
CNCRouterParts