Hi Chris,
from a quick look I would say, that EmcPose parameter returns a value. So you have to give the adress of an EmcPose variable like this
Code:
// guess you already have a tp instance
EmcPose pos;
if (tpGetPos(tp, &pos)) return Error;
// use valid pos from here on
with respect to the initial issue:
I don't believe, that jog-while-paused is the right way.
Better would be, save current state and allow to resume after hitting Stop.
Heidenhain works that way. They call the function "Goto".
On Fanuc controllers you can turn into singlestep mode. When machine stops for next "Run", you can switch into edit-mode and move cursor. Then you can change back to execute gcode and resume from the new current line.
At job we heavily use that functionality. After toolchange we code a verbose line, that takes all parameters to setup machine for current job like this:
Code:
T2 M6;
N10 G0 G90 G54 X10 Y20 S2000 M3 T5;
G43 H2 Z2;
...
So after a stop, N10 is the line, where you can start with "run from here". Fanuc supports "run from here" in singlestep mode. So after executing G43 we switch to edit mode and advance the cursor to the place, we really want to start. Then after changing mode back to gcode execution, the show may begin.
There may be plenty reasons, why you have to abort a running job. Linuxcnc - afaik - is not prepared to resume an aborted job. So this may be the real goal to go for.