Taras Koroljuk wrote:
> Rafael Skodlar<ra...@...>  writes:
>    
>> now run the following line:
>> sh /tmp/test.sh 4 5
>> program -f 1$ -p 2$
>> program -f 4 -p 5
>> =====
>> program -f $1: [4] -p $2: [5]
>>
>> Last four lines are the result of the script. You need to change 1$ to
>> $1. 'exit 0' is not needed.
>>
>>      
> Thank you for replying my question. Script works great, but it is
> still does not work when i'm trying to launch it from EMC, typing
> command in MDI: M100 P4 Q5.
>    
Are you trying to run the G-code after the vacuum control M codes have 
been added?  If so, you can't do that in this way.  The external M1xx 
program runs, but it is run separately from the G-code program - EMC2 
will not execute G-code that is produced from an M1xx program.

There are two ways to do what you want:
1) Make a filter program, and add the vacuum codes as you load the 
program (FILTER settings should be in the AXIS documentation)
2) Make the G-code a separate file with a subroutine in it, and change 
that subroutine file with the M code.  I don't know if this will work 
though - AXIS pre-loads the entire program to generate the preview, and 
I don't know what happens with M-codes during that preview run.  Also, 
the subroutine file(s) may be loaded at preview time, and may not be 
re-loaded during program execution.

- Steve



------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to