8426
« on: February 07, 2010, 03:21:09 AM »
I think Ray has already summed up the situation but this is my interpretation of the chain of events……
There are basically two programs running here at the same time and the speed at which they each execute is not always the same. Mach has many tasks to execute at the same time (screen refresh, keyboard poll, port monitor, etc. etc.) whilst being asked to update a DRO and will be considerably slower to respond or complete the task than the auto tool zero macro. Therefore it is possible for a macro to write a new value to a DRO and then read from this DRO the old value because Mach has not had time to update it fully. The ‘while / wend’ controls the speed at which the macro executes and has little, if any, effect on the speed at which Mach executes whereas the ‘G4’ dwell controls the speed at which Mach executes but has little, if any, effect on the speed at which the macro executes.
Tweakie.