Jeff Epler pravi:
> 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 */ ) {
>
>
>   
Version is v2.5~branch
I can't apply patch. Seems that we have different version.
I'm sure there is no whitespace and line termination is linux style.
Can you send entire emctaskmain.cc?

Slavko.

Here is console output...

sla...@emc2-laptop:~/emc2-dev$ git am --signoff mail.eml
Applying Strange MDI.
error: patch failed: src/emc/task/emctaskmain.cc:125
error: src/emc/task/emctaskmain.cc: patch does not apply
Patch failed at 0001.
When you have resolved this problem run "git-am --resolved".
If you would prefer to skip this patch, instead run "git-am --skip".
sla...@emc2-laptop:~/emc2-dev$




------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to