Hello Guest it is April 20, 2024, 01:00:54 AM

Author Topic: Auto tool change macro file help needed  (Read 2870 times)

0 Members and 1 Guest are viewing this topic.

Auto tool change macro file help needed
« on: December 15, 2016, 03:48:06 AM »
i tried in VB scripts the code can activate output and offset, but using MDI type M06 T3, nothing happen. Much help needed. newbie here.
tool = GetSelectedTool()
If tool=3 Then
If GetOEMLED(854) Then
   DeactivateSignal(OUTPUT3)
Else
   ActivateSignal(OUTPUT3)
End If
code"G52 x100 y0 z0"

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Auto tool change macro file help needed
« Reply #1 on: December 15, 2016, 07:35:54 AM »
if you are talking about length Offset

G43 HXX

is your friend.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Auto tool change macro file help needed
« Reply #2 on: December 15, 2016, 07:12:16 PM »
Hi TPS, My offset just for between different Tools, not height offset. If use VB script it can be function by check at mach3 there. but when use coding or type M06 at MDI. nothing happen. My sample gcode

N0010 (Filename: Circle flame.tap)
N0011 (Post processor: Flame M4.scpost)
N0012 (Date: 09/12/2016)
N0013 G21 (Units: Metric)
N0014 G90 G91.1 G40
N0015 (Part: Circle)
N0016 (Process: Outside Offset, 0, T16: Flame, 1.5 mm kerf, F500.00)
N0017 M06 T2
N0018 M26
N0019 G00
N0020 X100.0000 Y-10.7500
N0021 M04
N0022 G01 Y-5.7500 F500.00
N0023 E5P1 (THCOFF) (On all corners)
N0024 Y-0.7500
N0025 G02 X99.0000 Y-0.7450 I-0.0000 J100.7500
N0026 E5P0 (THCON) (On lead in)
N0027 X104.9979 Y-0.6260 I1.0000 J100.7450
N0028 E5P1 (THCOFF) (On all corners)
N0029 X100.0000 Y-0.7500 I-4.9979 J100.6260
N0030 G01 X99.2929 Y-1.4571
N0031 E5P0 (THCON) (On all corners)
N0032 X98.5858 Y-2.1642
N0033 M05

it just passby but no macro running during M06.
Re: Auto tool change macro file help needed
« Reply #3 on: December 15, 2016, 07:14:53 PM »
M06.m1s

Tool = GetSelectedTool()
If Tool < 1 Or Tool > 8 Then      'make sure new tool isnt a number
   DoOEMButton(1003)         'below 1 or above 8
   MsgBox("Tool Number Not Valid")
End
End If

If Tool = 3 Then
   ActivateSignal(OUTPUT3)
Else
   DeactivateSignal(OUTPUT3)
   Code"G52 x10 y100 z0"
End If
End

If Tool = 4 Then
   ActivateSignal(OUTPUT4)
Else
   DeactivateSignal(OUTPUT4)
   code"G52 x100 y100 z0"
End If
End
Re: Auto tool change macro file help needed
« Reply #4 on: December 15, 2016, 07:42:55 PM »
Sorry here. I din turn on auto tool changer in setting. Have a nice day.