mach4 4612.. ESS v284... this is the recommended versions I believe.. I'm pretty sure I know what the problem is.. not so sure I can fix.. I've tried a bunch of modifications to my original Gcode.. its somehow may be related to several items.. G04.. M99 and I now believe it may be the way I was implementing the M64 functions.. I was duplicating the Gcode from the original machine line for line.. I am using Mach4 as a retrofit. At first it appeared that Mach4 didn't like G04's anywhere in the code.. using any G04 caused all issues with hanging on moves, io not synchronized between Mach4 and the ESS. As well it would now hang on one of the G04 lines pretty consistently.. not any specific line.. if I used five G04's, it could hang on any one, and after a random number of cycles. Didn't like the M99 at the end of the program either.. that also seemed to magnify the problems.. I removed all blank lines in the Gcode just in case they were causing a problem of some sort (they were simply there for readability). I've tried a bunch of things but now I've also changed all my M64 coding.. at first I thought it could be that there was no motion command directly after some of the M64's.. so I modified the program and placed one after each. That did not resolve the issue.. so my current test has every M64 in a motion line.. in some cases where I had 2 M64's in a row, I split up my motion on at least one axis and placed every M64 in a motion line.. this appears to be working. Not sure if this was the actual issue. I'm letting this cycle for several hours. If this works I'll go a bit backwards and change my M30 to an M99 and see if the problem resurfaces. Then I'll try adding in a G4 and see if the problem resurfaces. Then I'll add a few blank lines back in. Could be they all played a part or they are fine but magnified in some fashion the M64 problem.
So I'm pretty sure it has something to do with the way Mach4, and/or the ESS, handle motion and io. Probably very few programs have such a short cycle, and have so many io changing states in that period.. could have easily been something that was never tested in that fashion. So either Mach4 and/or the ESS, simply don't handle the API calls and something either overlaps, or causes some low level procedure to exit incorrectly, or not exit at all. Placing the M64 in a motion line, somehow changes the methods of how Mach4 and/or the ESS implement, handle and keep track of what they are doing.
First run after I modified the M64 calls ran for nearly 3 hours without a problem. I'm on the second test run and its been cycling with about 90 minutes without any issue. Hopefully this is the resolution, but I've been working on fixing this for nearly 5 months so I was pretty frustrated. Its one of those bizarre issues where it could run for anywhere from 2 minutes to an hour or more, and then hang or not synchronize io. You don't usually expect that would be caused by the way you are turning on an output using the canned function that comes with the software. So I was looking at everything else, including the modifications I made to the screens and what I would have thought were minor changes to the screen scripting.
and thanks for the reply.. I do appreciate it..
