Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/src/config/python-interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ see <<python:reading-ini-values,ReadingINI file values>> for an example.
*paused*:: '(returns boolean)' -
`motion paused` flag.

*stepping*:: '(returns boolean)' -
`motion stepping` flag.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I even added documentation for once :)


*pocket_prepped*:: '(returns integer)' -
A Tx command completed, and this pocket is prepared. -1 if no
prepared pocket.
Expand Down
1 change: 1 addition & 0 deletions src/emc/nml_intf/emc_nml.hh
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ class EMC_TRAJ_STAT:public EMC_TRAJ_STAT_MSG {
bool queueFull; // non-zero means can't accept another motion
int id; // id of the currently executing motion
bool paused; // non-zero means motion paused
bool stepping; // non-zero means motion stepping single block
double scale; // velocity scale factor
double rapid_scale; // rapid scale factor
//double spindle_scale; // moved to EMC_SPINDLE_STAT
Expand Down
9 changes: 9 additions & 0 deletions src/emc/task/emctaskmain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,7 @@ static int emcTaskPlan(void)
break;

case EMC_TASK_PLAN_STEP_TYPE:
emcStatus->motion.traj.stepping = 1;
stepping = 1; // set stepping mode in case it's not
steppingWait = 0; // clear the wait
break;
Expand Down Expand Up @@ -1249,6 +1250,7 @@ static int emcTaskPlan(void)
break;

case EMC_TASK_PLAN_STEP_TYPE:
emcStatus->motion.traj.stepping = 1;
stepping = 1;
steppingWait = 0;
if (emcStatus->motion.traj.paused &&
Expand Down Expand Up @@ -1324,6 +1326,7 @@ static int emcTaskPlan(void)
break;

case EMC_TASK_PLAN_STEP_TYPE:
emcStatus->motion.traj.stepping = 1;
stepping = 1; // set stepping mode in case it's not
steppingWait = 0; // clear the wait
break;
Expand Down Expand Up @@ -2123,6 +2126,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
// clear out the interpreter state
emcStatus->task.interpState = EMC_TASK_INTERP::IDLE;
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
emcStatus->motion.traj.stepping = 0;
stepping = 0;
steppingWait = 0;

Expand Down Expand Up @@ -2217,6 +2221,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
break;

case EMC_TASK_PLAN_EXECUTE_TYPE:
emcStatus->motion.traj.stepping = 0;
stepping = 0;
steppingWait = 0;
execute_msg = (EMC_TASK_PLAN_EXECUTE *) cmd;
Expand Down Expand Up @@ -2312,6 +2317,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
retval = -1;
break;
}
emcStatus->motion.traj.stepping = 0;
stepping = 0;
steppingWait = 0;
if (!taskplanopen && emcStatus->task.file[0] != 0) {
Expand Down Expand Up @@ -2360,6 +2366,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
emcTrajResume();
emcStatus->task.interpState = interpResumeState;
emcStatus->task.task_paused = 0;
emcStatus->motion.traj.stepping = 0;
stepping = 0;
steppingWait = 0;
retval = 0;
Expand Down Expand Up @@ -2590,6 +2597,7 @@ static int emcTaskExecute(void)
// clear out the interpreter state
emcStatus->task.interpState = EMC_TASK_INTERP::IDLE;
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
emcStatus->motion.traj.stepping = 0;
stepping = 0;
steppingWait = 0;

Expand Down Expand Up @@ -3497,6 +3505,7 @@ int main(int argc, char *argv[])
// clear out the interpreter state
emcStatus->task.interpState = EMC_TASK_INTERP::IDLE;
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
emcStatus->motion.traj.stepping = 0;
stepping = 0;
steppingWait = 0;

Expand Down
1 change: 1 addition & 0 deletions src/emc/usr_intf/axis/extensions/emcmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ static PyMemberDef Stat_members[] = {
{(char*)"queue_full", T_BOOL, O(motion.traj.queueFull), READONLY, NULL},
{(char*)"motion_id", T_INT, O(motion.traj.id), READONLY, NULL},
{(char*)"paused", T_BOOL, O(motion.traj.paused), READONLY, NULL},
{(char*)"stepping", T_BOOL, O(motion.traj.stepping), READONLY, NULL},
{(char*)"feedrate", T_DOUBLE, O(motion.traj.scale), READONLY, NULL},
{(char*)"rapidrate", T_DOUBLE, O(motion.traj.rapid_scale), READONLY, NULL},
{(char*)"velocity", T_DOUBLE, O(motion.traj.velocity), READONLY, NULL},
Expand Down
Loading