6 Station Turret with Pawl,stepper and Ref.Sensor for Tool 1

More
24 Dec 2021 11:14 #229873 by hitchhiker
Hi dudes,

My name is Alex and i am from Germany.

I done some Cnc Retrofits to Emco Mills and Lathes with GRBL and Mach3.
Last year i done a Retrofit with a 3 Axis Mill for wood for a friend with Linuxcnc.

Now i want to play with my Emco Compact 5 CNC Lathe and Linuxcnc.

I done a Retrofit on this Lathe with Mach3 via Parallelport and usb (rs485/modbus for vfd).

Yesterday i start the Retrofit to Linuxcnc.
All is Done.. but the ATC is my problem.

Original the Atc works openloop with a dc motor and some timing.

i changed the dc motor to a nema17 stepper,add a light barrier and a slotted disc to get the Reference to Tool1.
then i wrote up a macro for mach3.

the atc can rotate in forward direction continously.
backward only some steps.

I am not a pro with coding... but my maker works on mach3 perfect.

the reference tool1 is with contact to the pawl.



now the big please to the community... 

my English is not good... and I am new to linux... is it possible to get the ATC working on linuxcnc?

6 Station, stepper,ref.sensor for Tool1, forward continuously and backward to lock to the pawl.


please please please help me ;)

thanks!


 

Please Log in or Create an account to join the conversation.

More
24 Dec 2021 11:20 #229874 by hitchhiker
here is the mach3 makro,its very basic but it works:

currenttool = GetOEMDRO(824) 'user DRO 824 is used to store the current tool.
FeedCurrent = GetOEMDRO(818) 'In this line assign whatever is in this DRO to the variable.

If (currenttool = 2 Or currenttool = 4 Or currenttool = 6) Then


Code"G53 Z20 F200" 'Move to tool change location internal
While Ismoving()
Wend
Code"G53 X5 F200"
While Ismoving()
Wend
End If


If (currenttool = 0 Or currenttool = 1 Or currenttool = 3 Or currenttool = 5) Then
Code"G53 X5 F200" 'Move to tool change location external
While Ismoving()
Wend
Code"G53 Z20 F200"
While Ismoving()
Wend
End If

numtools = 99 'The number of valid tools
newtool = GetSelectedTool( ) 'read the new requested tool


While(currenttool< 1 Or currenttool > numtools) 'Check that currenttool contains a legal tool number.
currenttool = question("Please enter the current tool") 'If not ask to enter the current tool in position.
Wend
SetOEMDRO 1000,newtool 'Set user DRO 1000 to the new tool number

If (newtool > 0) Then 'Added this

dist = (newtool Mod 6 ) - (currenttool Mod 6 ) 'the number of turret positions to move to the requested tool.

If (dist < 0) Then 'Check if rollover needed
dist = 6 - Abs(dist)
End If

Code " F75 G91 G01 A" & dist 'Move to the new turret position.
While IsMoving()
Wend
Sleep(25)
Code " F5 G91 G01 A" & -0.075 'Reverse move to lock
While IsMoving()
Wend
Sleep(25)
Code "G90" 'Set back to absolute mode.

SetCurrentTool(newtool)
Code "F" &FeedCurrent 'restore starting feed rate

End If

Please Log in or Create an account to join the conversation.

More
29 Dec 2021 21:47 #230283 by andypugh
Sorry for the slow reply.

I think that the "carousel" HAL component ought to be able to handle your toolchanger.

linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html

Alternatively, there are some dedicated Emco components here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...oolchanger_component

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.078 seconds
Powered by Kunena Forum