I am getting a syntax error can you perhaps help me with this ?
'Macro M6Start
Message""
If GetOEMLed(807) And GetOemLED(80 And GetOemLed(809) And GetOemled(811) Then
MsgBox" 1 or more axis are NOT REFERENCED cancel program and REF XYZB axis"
End
End If
Dim OldTool As Single
Dim NewTool As Single
Dim X As Double
Dim Y As Double
Dim Z As Double
'********************************
OldTool = GetCurrentTool()
NewTool = GetSelectedTool()
If NewTool = OldTool Then
MsgBox" Same Tool, NO ACTION"
End
End If
If NewTool > 10 Or NewTool < 1 Then
MsgBox" Tool # 1-10 ONLY "
End
End If
Code "M09" 'Coolant Off
Code "M05" 'Stop Spindle
Message" Coolant And Spindle Turned Off"
'******************************
Code"G53 G0 X0,Y0,Z0"
While IsMoving()
Wend
ActivateSignal(Output1) 'Tool Turret In'
ActivateSignal(Output2) 'Release Tool'
Sleep 500
Code "G53 G1 Z40 F650 "
Call MovePos(NewTool) 'The ATC moves to the new tool.
While IsMoving()
Wend
Code "G53 G1 Z0 F650"
GetOEMDro (85)
DeactivateSignal (OutPut2) 'Clamp Tool'
Sleep 1000
DeactivateSignal (OutPut1) 'Tool Turret Away'
Sleep 1500
Do
DeactivateSignal(OutPut7)
Sleep 1000
Loop
GetCurrentTool
GetOEMDro (85,40)
Sub MovePos(ByVal ToolNumber As Integer)
Select Case ToolNumber 'Positions to each tool in B-axis
Case = 1
Code " G53 G0 A 360"
Case = 2
Code " G53 G0 A 36"
Case = 3
Code " G53 G0 A 72"
Case = 4
Code " G53 G0 A 108"
Case = 5
Code " G53 G0 A 144"
Case = 6
Code " G53 G0 A 180"
Case = 7
Code " G53 G0 A 216"
Case = 8
Code " G53 G0 A 252"
Case = 9
Code " G53 G0 A 288"
Case = 10
Code " G53 G0 A 324"
End Select
End Sub