Hello all !
I'm writing my own Pluging with Visual C++ 2008 and the so convenient 'Wizard Plugin' by Edward D. Bryson.
It's a kind of very simple plugin:
A dialog box asks you to choose in a list Box the item you want to CNC machine and then brings the spindle to
the 0 reference XY of that piece.
The help i need is the following:
When i'm homing the machine with DoButton(1024);DoButton(1023);DoButton(1022);
i would like to know how to do for waiting the homing to be done (like a kind of a While( IsMoving) statement, but in C++)
before executing a next instruction.
I've tried if(Engine->State== true) , if(Engine->Jogging== true) , if(Engine->Homing== true) and some others
but each time mach3 does it's homing without taking care of of those conditions.
In the same way ,when i'm executing a GCode( X..Y.. Z...) instruction, a SetDRO(800,0.0000) just after isn't executed.
It's seems that Mach3 while moving the axis,continues the "reading" of the code but doesn't execute it -like a jump- , and
THEN , when the move is finished, take again any new instruction into account.
So instructions are " lost "in between..
Is it possible to programmatically initiate a move, then wait till this movement is finished (how?
), and then execute other lines of codes ?
Thanks for helping
Cyril