On Tue, Mar 02, 2010 at 08:28:17PM +0100, Slavko Kocjancic wrote: > Hello.. > I write hole center probe subroutine and works nice if it's called from > main program. > > in test.ngc I have > ;----------------------------------- > o<hcenter> call > M02 > ;----------------------------------- > > > and that's works without problem. > > but if I type > o<hcenter> call > in MDI mode the only 1's move is ok and after that the move's are > unpredictable for my opinion.
Which version of emc are you testing with? This behavior is buggy in 2.3, but in v2.4_branch and master there's a change that is intended to improve or fix this problem: commit 314f3aa2d90e5ec1f7840166f3e0ad11a9fbc0a6 Author: Jeff Epler <[email protected]> Date: Wed Jan 27 08:16:47 2010 -0600 improve behavior of MDI O-calls Bad things happen when the motion id is zero. This could frequently happen when doing O-calls from MDI, because the motion ids for an MDI start at pseudoMdiLineNumber and increase for each executed motion (? line?) in the subroutine. For instance, if pseudoMdiLineNumber was -7, then executing an O-call with 8 or more lines of motion would issue a motion with ID 0. diff --git a/src/emc/task/emctaskmain.cc b/src/emc/task/emctaskmain.cc index 39ce8ad..f26c1cf 100644 --- a/src/emc/task/emctaskmain.cc +++ b/src/emc/task/emctaskmain.cc @@ -125,7 +125,7 @@ NMLmsg *emcTaskCommand = 0; // signal handling code to stop main loop static int done; static int emctask_shutdown(void); -static int pseudoMdiLineNumber = -1; +static int pseudoMdiLineNumber = INT_MIN; static int all_homed(void) { for(int i=0; i<9; i++) { @@ -1957,7 +1957,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd) } if (execute_msg->command[0] != 0) { if (emcStatus->task.mode == EMC_TASK_MODE_MDI) { - interp_list.set_line_number(--pseudoMdiLineNumber); + interp_list.set_line_number(++pseudoMdiLineNumber); } execRetval = emcTaskPlanExecute(execute_msg->command, pseudoMdiLineNumber); if (execRetval == 2 /* INTERP_ENDFILE */ ) { ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
