Hello Guest it is April 18, 2024, 01:45:34 AM

Author Topic: Mach 3 toolchange for dummies???  (Read 84533 times)

0 Members and 1 Guest are viewing this topic.

Offline rasta

*
  •  32 32
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #160 on: October 29, 2013, 04:59:24 AM »
Hi Hood;
Can you please suggest a line that can be added to the vb script so the program does not start until the signal is given that the Toolchanger has reached the bottom of the location slot? That way if there is any missing steps in the Toolchanger stepper it will not do anything until corrected
Kind regards
Mariano


After some sleep I see you wouldnt actually have to put the move to toolchange pos in each section, just having Code "G53 G0 X* Z*" after the first block would work fine.

Like this

 If GetSelectedTool() = GetCurrentTool() Then
End
 End If
 
Code "G53 G0 X* Z*"
While IsMoving()
Wend
 
 If GetSelectedTool = 1 Then
 ActivateSignal(OutPut2)
 Sleep 500
 Code "G53 G0 A0"
 While IsMoving()
 Wend
 DeActivateSignal(OutPut2)
 End If
 
 
 If GetSelectedTool = 2 Then
 ActivateSignal(OutPut2)
 Sleep 500
 Code "G53 G0 A45"
 While IsMoving()
 Wend
 DeActivateSignal(OutPut2)
 End If
 

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #161 on: October 29, 2013, 03:12:00 PM »
Do you have an input to Mach that shows the turret is not clamped?
Hood

Offline rasta

*
  •  32 32
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #162 on: October 29, 2013, 03:21:46 PM »
Do you have an input to Mach that shows the turret is not clamped?
Hood
i have set up pin 11 as an input , and fitted a limit switch inside the toolchanger that closes when the toolchanger shaft has bottomed, but, Im lost on the VB bit

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #163 on: October 29, 2013, 03:37:58 PM »
Maybe something like this would do.


If GetSelectedTool = 1 Then
 ActivateSignal(OutPut2)
 Sleep 500
 Code "G53 G0 A0"
 While IsMoving()
 Wend
 DeActivateSignal(OutPut2)
sleep 1000
If IsActive(Input*) Then
End
Else
MsgBox("Turret not clamped")
DoOemButton(1003)
End If
 End If

Offline rasta

*
  •  32 32
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #164 on: October 29, 2013, 03:47:43 PM »
Maybe something like this would do.
Tank you Hood;
I will try it tonight when I come back, now I have to drive a Mori-Seiki, with twin chucks and live tooling .great machine.
regards
Mariano


If GetSelectedTool = 1 Then
 ActivateSignal(OutPut2)
 Sleep 500
 Code "G53 G0 A0"
 While IsMoving()
 Wend
 DeActivateSignal(OutPut2)
sleep 1000
If IsActive(Input*) Then
End
Else
MsgBox("Turret not clamped")
DoOemButton(1003)
End If
 End If

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #165 on: October 29, 2013, 05:06:36 PM »
Thinking about it you will likely get away with just putting these lines at the end of the macro rather than having to put them in each tool call.

Hood

Offline Tr_G

*
  •  10 10
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #166 on: October 29, 2013, 08:47:38 PM »
I did get the tool changer working on a 1984 Kitamura but only in clockwise direction. When I tried to go cw and ccw it would miss count the tool because when the motor on the changer stopped sometimes the led signal will be on and sometimes off and this would mess up the tool count.
If any one can add some code to correct the position to check if the led signal is on when it finishes the tool change rotation this would correct the cw cww problem.




'Find shortest route to next tool

ChgTool = (NewTool - SpinTool)

If ChgTool < 0 Then
   ChgTool = (16 + ChgTool)
End If

If ChgTool > 0 And ChgTool <= 16 Then          'in my code here I changed the 8 to 16 so it only goes CW
   Call CW(ChgTool)
   Exit Sub
End If

If ChgTool > 0 And ChgTool > 8 Then
   ChgTool = (-16 + ChgTool) * -1
   Call CCW(ChgTool)
   Exit Sub
End If
« Last Edit: October 29, 2013, 08:53:22 PM by Tr_G »