Hello Guest it is March 29, 2024, 04:46:08 AM

Author Topic: Denford lathe 8 position BCD (3 input slot reader), ATC M6  (Read 9791 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Denford lathe 8 position BCD (3 input slot reader), ATC M6
« on: July 11, 2008, 11:46:47 AM »
Here is an M6 for a 8 position Denford ATC, the kind that has a 3 input slot reader to code the position of the turret. Also, it has an output that turns on an output that runs the ATC forward at 24 volts, once it is at the correct tool position, the signal dies, and reley goes back to a 12 side that runs the turret backward and locks it, the 12 volt is always on unless moving forward for new tool.

This is from a request from a guy on the CNC zone that has this kind of set up.
Resources:
INPUTS1, 2 and 3 (sensors that read the slot pattern in the turret to code tool/slot number.
OUTPUT3 (this turns on the releay to flip over to the 24 volt opposite polarity side, to run the turret forward in a search for the next tool, it deactivates when the "3 digit" binary code from the inputs above match the Tool/slot for the new tool, it then reverses and locks into position


'M6Start.M1s

Sub Main()

NewTool = GetSelectedTool()
OldTool = GetCurrentTool()
MaxToolNum = 8 'Max number of tools for the changer

While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend

If NewTool = OldTool Or NewTool = 0 Then
Exit Sub
End If

If OldTool <> NewTool Then
   While Slot <> NewTool
   ActivateSignal(OUTPUT3) 'start rotating forward
      If IsActive(INPUT3) And Not IsActive(INPUT2) And Not IsActive (INPUT1) Then
      Slot = 1
      End If
      If Not IsActive(INPUT3) And Not IsActive(INPUT2) And Not IsActive (INPUT1) Then
      Slot = 2
      End If
      If Not IsActive(INPUT3) And Not IsActive(INPUT2) And IsActive (INPUT1) Then
      Slot = 3
      End If
      If IsActive(INPUT3) And Not IsActive(INPUT2) And IsActive(INPUT1) Then
      Slot = 4
      End If
      If IsActive(INPUT3) And IsActive(INPUT2) And IsActive(INPUT1) Then
      Slot = 5
      End If
      If Not IsActive(INPUT3) And IsActive(INPUT2) And IsActive(INPUT1) Then
      Slot = 6
      End If
      If Not IsActive(INPUT3) And IsActive(INPUT2) And Not IsActive (INPUT1) Then
      Slot = 7
      End If
      If IsActive(INPUT3) And IsActive(INPUT2) And Not IsActive(INPUT1) Then
      Slot = 8
      End If
   Wend
   Sleep(100)
   DeActivateSignal(OUTPUT3) 'stop rotating forward, rotate backward now
End If

SetOEMDRO(824,NewTool)
Code "G4 P2"          'A pause time of 2 seconds to give your reverse turret time to seat
While IsMoving
Wend

End Sub
Main

'have fun,
'Scott 

fun times
Re: Denford lathe 8 position BCD (3 input slot reader), ATC M6
« Reply #1 on: August 25, 2008, 01:44:45 PM »


This Macro, slightly changed to suit 4 inputs, also works on my Emco 220 lathe, but is not "safe" as I have Mach3 set up with a switch to manually revolve the turret so as to set up tools. so if the DRO is showing tool 1 and the toolchanger is actually on tool 3 if I enter "tool 1" the changer stays where it is as the control thinks its still on tool 1.
Is there a way to dynamically update the tool number on the DRO as the changer goes round or should I throw away the switch?  ???

Jim.
Re: Denford lathe 8 position BCD (3 input slot reader), ATC M6
« Reply #2 on: January 27, 2009, 02:53:26 AM »
Hi ,

I have tested the above code it run fine when i run from vb script editor but not run when i run from mach screen as soon as i put m6 t02 it will set the dro to 0 tool no for every value on tool i have also enabled auto tool changer in config.

please help.

Ahmed

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Denford lathe 8 position BCD (3 input slot reader), ATC M6
« Reply #3 on: January 27, 2009, 08:56:03 AM »
on a Lathe the way you have to do your tool change code is slightly different.  I.e. for Tool#1 you need to post:
T0101 M6

The first 01 is the tool numer, the second 01 is the offset, the T wiord needs to come before the M6.

scott
fun times
Re: Denford lathe 8 position BCD (3 input slot reader), ATC M6
« Reply #4 on: January 27, 2009, 03:27:42 PM »
Thanks got it working but i have to add 4 bit bcd as tool changer is 10 tools will try.


Ahmed
Re: Denford lathe 8 position BCD (3 input slot reader), ATC M6
« Reply #5 on: December 02, 2014, 09:45:40 AM »
Thank you very much "Scott"

Best reguard

shumran D.
Re: Denford lathe 8 position BCD (3 input slot reader), ATC M6
« Reply #6 on: January 01, 2015, 05:21:54 AM »
Thank you very much "Scott"

Best regards,

shumran D.