Saturday, February 21, 2015

Custom M codes for coolant nozzles

  Ok, I was making a screen set for my mill that gets rid of all the stuff that is not used. And I thought wouldn't it be nice to have an M code that sets the coolant nozzle functions automatically. The special function screen could be pretty much forgotten about.

  The M codes are M1000 through M1008, (M1000 is function code 0, M1008 is function 8 etc.). Sweep angle can be set using the same process.

   Using the VB script editor in Mach3, this code was made:

    SetUserDRO(2060, 8)
 
   The 2060 is the DRO code that the function number is displayed in, on the special function page.

   This was named M1008 saved  and placed in the macros folder in Mach3.

  In the G code an M1008  is written and an 8 will automatically be put into the special function dro. I use sheetcam and it allows for code snippets to made and added. The code snippet is selected and added before a machining operation.

   When the m code is placed before tool number the special function brain must be unenabled. If it is after the tool code it doesn't matter.




     The above picture shows the code that sheet cam added. Lines N080,N090,N100.  The far right shows the nozzle position code.







No comments:

Post a Comment