Denford Orac Turret working on Mach 3 macro
Moderators: Martin, Steve, Mr Magoo
Re: Denford Orac Turret working on Mach 3 macro
I am not sure why it wouldn't work in the end. I got my head around the script and changed it. Decided to do it slightly different, i have it working now. I will post mine up as it may help someone in the future who is searching. Something i have noticed is that the macro does not have anything relating to positions in it. Will mach3 sort out its self out moving in and out of the last position to perform a tool change? Or does this all depend on what you are using to produce gcode?
-
- Posts: 1
- Joined: Sat 16 Jan , 2021 11:51 am
- Hardware/Software: Orac Triac vmc Mach software
Re: Denford Orac Turret working on Mach 3 macro
Hello I rejoined to share the macro from 2014 for the auto toolchanger in mach3......I thought I had put it here....maybe it was the mach support site.
anyhoo, I have the lathe back for an upgrade to smoothstepper and more IO and thought I'd put it here as well.
IO will need changing to the ones you are using.
Also Angel Tech.....I have a stepper motor here that I sold you a long time ago.....finally removed it......not got any of the original details and can't access the original details.
anyhoo, I have the lathe back for an upgrade to smoothstepper and more IO and thought I'd put it here as well.
IO will need changing to the ones you are using.
Code: Select all
Tool = GetSelectedTool()
OldTool = GetCurrentTool()
NewTool = Tool
MaxToolNum = 8 'Max number of tools for the changer
While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number Up To " & MaxToolNum)
Wend
Call StartTool
While SelectedTool <> NewTool
Call CheckPins
sleep(20)
Wend
sleep(400) 'delay in ms to over-run selected tool position
SelectedTool = NewTool
Call StopTool
sleep(400) 'delay to allow turret to lock into position
Call CheckPins
If SelectedTool <> NewTool Then 'verify that correct tool has locked in-place. Beep, announce and stop program if not
Beep
MsgBox ("Did You Select An Existing Tool?")
code "M00"
End If
SetCurrentTool(NewTool )
'//// Subroutines ////
Sub StartTool
ActivateSignal(Output3)
End Sub
Sub CheckPins
If Not IsActive(Input1) And Not IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 1
End If
If IsActive(Input1) And Not IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 2
End If
If IsActive(Input1) And Not IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 3
End If
If IsActive(Input1) And IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 4
End If
If IsActive(Input1) And IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 5
End If
If Not IsActive(Input1) And IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 6
End If
If Not IsActive(Input1) And IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 7
End If
If Not IsActive(Input1) And Not IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 8
End If
End Sub
Sub Stoptool
DeActivateSignal(Output3)
End Sub
Re: Denford Orac Turret working on Mach 3 macro
No idea id anyone still looks on here, but I followed the advice to get the inputs working. I had to do a couple of repairs but I've now got all three opto sensors triggering as they should.
I just can't get the macro to work, I get a did you select an existing tool popup and that's it???
Any help would be appreciated!
I just can't get the macro to work, I get a did you select an existing tool popup and that's it???
Any help would be appreciated!