Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

M998 Tool Change position mach3

6 REPLIES 6
Reply
Message 1 of 7
jbmachine
5855 Views, 6 Replies

M998 Tool Change position mach3

Hello
I am trying to get the mach3 post to work with a tool change position that I define in a parameter screen - so that every tool change goes to this point with out me having the enter a point to go to in the program. Just not sure where to put it in , any help would be great Thanks
6 REPLIES 6
Message 2 of 7
fonsecr
in reply to: jbmachine

Is there a reason why the tool change position varies? I would assume that the tool change position would normally be at the same location (or at least confined to 2 locations).

René Fonseca
Software Architect

Message 3 of 7
jbmachine
in reply to: jbmachine

when a tool change is called up it just goes back to a clearance plane - we had the same problem with a lab machine and another dedicated cam package - found out that the "tool change position" and a m998 macro with it implicated in the post sent the machine to its home pos. or where ever those settings were here is an example:
(MATERIAL  - ALUMINUM INCH - 6061)
(PROGRAM  - TRANSMISSION TOP WITH ENGRAVING DRILLL OP.NC)
(DATE      - OCT-09-2012)
(TIME      - 3:33 PM)
(T6  - .500 SPOT DRILL      - H6  - D6  - D0.5000")
N100 G00 G17 G20 G40 G80 G90 G64
[glow=red,2,300]/ N110 M998[/glow] ( TOOLCHANGE )
N120 T6 M06 (.500 SPOT DRILL)
N130 (MAX - Z.2)
N140 (MIN - Z-1.74)
N150 G00 G90 G54 X-.448 Y-.733 S1833 M03
N160 G43 H6 Z.2 M08
N170 G94
N180 G98 G73 Z-1.74 R.2 Q.032 F5.
N190 X-2.125 Y-.399
N200 G80 M09
N210 G00 G90 Z.2
N220 M05
[glow=red,2,300]/ N230 M998 [/glow]( TOOLCHANGE )
N240 G90
N250 M30

at the tool change for this operation we have it set to machine cords X-.1 Y.1 Z-.1 from home position - but some times depending on the part we change it then with the hekp of the macro in the machine parameters for the m998 and the post processor it will start from the m998 pos. and go back to m998 pos when done
if that made any sense also forgot to mention this is a manual tool change machine
Thanks
Message 4 of 7
fonsecr
in reply to: jbmachine

I'm not sure what you want to output in the NC program. Can you also show the desired NC output?

René Fonseca
Software Architect

Message 5 of 7
jbmachine
in reply to: jbmachine

Well right now the default mach2/3 post will do a tool change BUT wont go the position that is setup in the controller on our machine it uses an m998 macro I just need to know how to add it to the post processor so the post gets the data from the macro I would think - I tried replacing M06 with M998 and got a syntax error
would the macro help ??
Message 6 of 7
jbmachine
in reply to: jbmachine

Here is the macro file

Option Explicit   
' This macro iimplements Goto Tool Change logic   
Dim x, y, z, CurrMetric 
Dim PosIsMetric, DestX, DestY, DestZ 

If NOT GetLED (7)  AND Not GetLED (8) AND Not GetLED (9) Then ' axes are reffed so Abs coords OK                           
  x = GetUserDRO( 1200 ) 
  y = GetUserDRO( 1201 ) 
  z = GetUserDRO( 1202 ) 
  PosIsMetric = GetUserDRO (1209)  ' this is definition of what units the tool change position is in
  CurrMetric = GetLed (2) 
  If (CurrMetric <> 0 And PosIsMetric <> 0) Or (CurrMetric = 0 And PosIsMetric = 0) Then ' we need no conversion 
      DestX = x 
      DestY = y 
      DestZ = z 
    ElseIf CurrMetric <> 0 and PosIsMetric = 0  Then ' we need to convert to metric 
      If x <> 9999 Then DestX = x * 25.4 
      If y <> 9999 Then DestY = y * 25.4 
      If z <> 9999 Then DestZ = z * 25.4 
    Else ' convert to imperial 
      If x <> 9999 Then DestX = x / 25.4 
      If y <> 9999 Then DestY = y / 25.4 
      If z <> 9999 Then DestZ = z / 25.4 
    End If ' got a valid set of destinations 

  Code "G0"  ' to switch things to G0 mode if not there already 
  If z <> 9999 Then 
      Code "G53Z" & DestZ 
      If x <> 9999 And y <> 9999 Then ' can do coordinated move 
          Code "G53X" & DestX & "Y" & DestY 
      Else ' do separate move 
          If x <> 9999 Then Code "G53X" & DestX 
          If y <> 9999 Then Code"G53Y" & DestY 
      End If 
  Else 
        Message " Z must be moved for safety of X and Y moves but position is 9999"                           
  End If 
Else 
  Message "Cannot use button/M998 as not referenced" 
End If 

home machine then any tool change does the above
Message 7 of 7
jbmachine
in reply to: jbmachine

Just thought of this - Is it possible to have the machine go to home position clear z first of course then go to the home position?? can that be done in the post instead of the m998 if so How do I add it to the post
Thank you for your help

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report