by cncdrive » Fri Mar 02, 2018 10:56 pm
Yes, it can possibly, because if you commanding a movement in a macro then the macro's exec.Code function interprets the code and then commands the movement with pushing the movement into the motion buffer.
Now if the macro is not waiting for that motion to stop and commanding another movement with another exec.Code then the movement is still ongoing and when this second movement is placed into the buffer then the non programmed in this second code axes positions will be stored as they are at the moment. But the previous motion is still ongoing, so there is an intermediate coordinate for the axes.
And so when the second command gets executed then it will roll the coordinates which were not programmed back to the coordinates where the coordinates were when the second command was placed into the motion buffer, because the software could tell the API, that because these axes do not have to move, so their coordinates have to be this and that, but what coordinates at that timepoint the software sees is those intermediate coordinates, because the axis did not stop, it was still in motion.
This can't work elseway, because if it was working in a way that this possible problem was disabled in code then the exec.Codelist function could not work.
One or the other could not work... it is not possible to make everything all way to work, because there are logical contradictions between the 2.
So, in other words, because you guys asked for a .Codelist function with multi-line macro code execution using the lookahead buffer, for this reason the exec.Codes can't wait for eachother and the above explained problem could happen if the user is not coding a wait until the motion stops before executing a new movement with another exec.Code function.
It is the user's task to take care of this in the macros, otherwise these type of issues can happen.
Or use a Codelist function with multiply codes, but that is not always possible for all type of tasks, depends on what the user wants to code if it is possible or not.
Or the user could note the coordinates of the endmovement and then code the axes coordinates if it is nessessary not to wait to end the previous movement, however this is not possible with a probing, because the user code will not know in advance what the probing results will be.