Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: wyb_506 on June 19, 2012, 07:22:05 PM

Title: Load NC file Error. ask for help!
Post by: wyb_506 on June 19, 2012, 07:22:05 PM
I define a function in a microfiles named M15 ,
and I use TxM15 to change my tool,also I define a funtion in changing tool:
    MyZ = GetOemDro(802)
   If MyZ >55 Then
   code "g01 f1500"
   code "g53 z"&toolup
    msgbox " fail to release tool, press any key to continue"
   End If
but I find when I load a new nc file , the screen display all the lines,when to TxM15, then messagebox displayed and stop
please tell me why and how to avoid the error thank you
Title: Re: Load NC file Error. ask for help!
Post by: BR549 on June 19, 2012, 07:30:25 PM
The normal tool change call would be T?M6  and you setup your toolchange code in M6start.

If that code is all that is in your M15 macro then the variable TOOLUP is NOT defined.

(;-) TP
Title: Re: Load NC file Error. ask for help!
Post by: wyb_506 on June 19, 2012, 07:58:14 PM
hello BR549, thank you for your reply first.
M6 or M15 I think it is not the key question, my question is how to judge the difference between load nc file and normal cutting process,so I can add a judge in the code
Title: Re: Load NC file Error. ask for help!
Post by: wyb_506 on June 20, 2012, 04:29:34 AM
anybody else can give me a help? ! 
thank you
Title: Re: Load NC file Error. ask for help!
Post by: Hood on June 20, 2012, 05:33:56 AM
I dont know what you are asking and likely others are the same, if you can try and explain it again maybe you will get an answer.
Hood
Title: Re: Load NC file Error. ask for help!
Post by: BR549 on June 20, 2012, 11:42:55 AM
I would really like to help BUT i do not have a clue as to what you are asking please try again in a different manner.

(;-) TP

Title: Re: Load NC file Error. ask for help!
Post by: wyb_506 on June 20, 2012, 08:23:31 PM
ok ok thank you
in a simple way  is : I want to shield some code when Load a New NC file , but it can work in  normal cutting progarm
 like
 if ( not in Load program)
    MyZ = GetOemDro(802)
   If MyZ >55 Then
   code "g01 f1500"
   code "g53 z"&toolup
    msgbox " fail to release tool, press any key to continue"
   End If
(end if )
Title: Re: Load NC file Error. ask for help!
Post by: wyb_506 on June 20, 2012, 08:24:06 PM
if some GETOEMDro( ) function can give this information