HIYA Steve, (;-) Lets me give you a perfect example. WHAT IF Gcode acted like you say needing someone to baby sit it with semaphores to keep it in sync

Does the Gocde side ever get out of sync with millions of lines of Gcode ? NO it does not ? WHy ? Because it was programed NOT to get out of programed order.
Can Mach3/4 get out of sync ?? SURE IT DOES Examples are posted all over the forum where it did. Can you fix some of the issues with the use of semaphores sure you can BUT it is still a Kludge to have to do it.
I KNOW you are more than smart enough to understand that. Could you imagine having to use semaphores in Gcode programing ??
Ladder does not need a semaphore to keep it in sync. You do use loops to wait on events to finish but that is NOT to keep it in order of execution It is simply waiting on an event before it can complete the function. Can you use an out of sync event ? Sure you can but that is the exception NOT the rule.
I have used ladder combined with basic in PLCs that you could NOT get it out of sync. It could not happen. The ladder and Basic were properly integrated to prevent it from happening.
In the Case of LUA and Mach4 in should NOT be able to get out of sync either UNLESS that is what you want it to do. The exception NOT the rule.
LOOK at Fanuc Macro B Does it have that problem ? Not that I remember . I never had to program with semaphores there. Does it use loops sure it does it is a conditional language..
The problem with the use of kluges is it is NOT consistant across different machines. What works on one may NOT work on the next depending on the PC. SO then you have to bullet proof it with long wait states( semaphores) so that the fastest PC will work along with the slowest BUT who knows what the Delay should be

In the past every time I thought I had it fixed I would always find a Machine it would not work with. The end result was a function that was terrible to use as it took forever to run and would NOT run smoothly.
Take a Mach 3d probing routine for example. By the time you make it bullet proof it is PAINFUL to watch it work AND there is no way around the problem because of the wait states to insure it stays in sync , does not jump over code sections , and run sections out of order. HAVE you noticed there are ZERO high speed 3d probing routines for Mach3 while all other controllers have a high speed routine ??
I have Used/Tested a LOT of other controllers and Mach has been by far the worse in this respect. With most I can create a 3d probing routine of the creepy crawler type that just zooms across the surface. Try that with Mach. IT IS LIKE WATCHING PAINT DRY.
HOPEFULLY with Mach4 it can now be done all in Conditional Gcode BUT it will only be available in Industrial mode ??
So why can other controllers/PLCs do it and not Mach. Please explain so I will understand. Perhaps it is just ME.
NOW IF Mach4 and Lua were 2 seperate Operating systems running independant of each other I could see the need to intervein. BUT that is NOT suppose to be the case Mach4 and Lua should be integrated to work together NOT against each other.
(;-) TP