On 6/19/15 2:05 PM, Kenneth Lerman wrote:
> Answering my own question (and raising another): When I took out the return
> (with a value of zero), I stopped getting the error message.
>
> The issue it raises is how do I write a routine that can be used by other
> routines (and have a return value) and also be used from MDI. Of course an
> answer that avoids this problem is to use a global variable for the return
> code.

Return is an O-word command.

See the O-code docs here: 
http://linuxcnc.org/docs/2.7/html/gcode/o-code.html#_subroutine_return_values

You need "o123 return [#<success>]".

(Or whatever your subroutine name is.)

-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to