1
General Mach Discussion / Re: Tool table offset ignored
« on: March 24, 2016, 09:10:07 AM »
Hi Rich,
Mach3 version R.3.043.066
I hope this is the script info you mean (from the M6start.m1s file)
Code "M200"
Sleep (3000)
NewTool=GetSelectedTool()
OldTool=GetCurrentTool()
MaxToolNum = 8
If OldTool<>NewTool Then
While Tool <> NewTool
ActivateSignal(Output3)
If isactive(Input1)And isactive(Input2)And Not isactive(Input3)And Not isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=1
End If
If isactive(Input1)And Not isactive(Input2)And isactive(Input3)And Not isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=2
End If
If isactive(Input1)And isactive(Input2)And isactive(Input3)And Not isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=3
End If
If isactive(Input1)And Not isactive(Input2)And Not isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=4
End If
If isactive(Input1)And isactive(Input2)And Not isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=5
End If
If isactive(Input1)And Not isactive(Input2)And isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=6
End If
If isactive(Input1)And isactive(Input2)And isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1)Then
Tool=7
End If
If isactive(Input1)And Not isactive(Input2)And Not isactive(Input3)And Not isactive(Input4) And isactive (Oemtrig1)Then
Tool=8
End If
Wend
If isactive(OEMTRIG5) Then
Sleep (100)
DeActivateSignal(Output3)
End if
ActivateSignal(Output4)
Sleep(100)
ActivateSignal(Output7)
Sleep(1500)
DeActivateSignal(Output4)
DeActivateSignal(Output7)
End If
SetOEMDRO(824,Newtool)
While IsMoving
Wend
End
Grtz Statler
Mach3 version R.3.043.066
I hope this is the script info you mean (from the M6start.m1s file)
Code "M200"
Sleep (3000)
NewTool=GetSelectedTool()
OldTool=GetCurrentTool()
MaxToolNum = 8
If OldTool<>NewTool Then
While Tool <> NewTool
ActivateSignal(Output3)
If isactive(Input1)And isactive(Input2)And Not isactive(Input3)And Not isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=1
End If
If isactive(Input1)And Not isactive(Input2)And isactive(Input3)And Not isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=2
End If
If isactive(Input1)And isactive(Input2)And isactive(Input3)And Not isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=3
End If
If isactive(Input1)And Not isactive(Input2)And Not isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=4
End If
If isactive(Input1)And isactive(Input2)And Not isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=5
End If
If isactive(Input1)And Not isactive(Input2)And isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1) Then
Tool=6
End If
If isactive(Input1)And isactive(Input2)And isactive(Input3)And isactive(Input4) And Not isactive (Oemtrig1)Then
Tool=7
End If
If isactive(Input1)And Not isactive(Input2)And Not isactive(Input3)And Not isactive(Input4) And isactive (Oemtrig1)Then
Tool=8
End If
Wend
If isactive(OEMTRIG5) Then
Sleep (100)
DeActivateSignal(Output3)
End if
ActivateSignal(Output4)
Sleep(100)
ActivateSignal(Output7)
Sleep(1500)
DeActivateSignal(Output4)
DeActivateSignal(Output7)
End If
SetOEMDRO(824,Newtool)
While IsMoving
Wend
End
Grtz Statler