Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: truckwiz on July 06, 2008, 09:19:18 AM
-
Hi,
I'm setting up a lathe with mach turn , everything is working good so far except that the code to turn a radius at the end of a piece of stock wants to cut out a whole ball. I believe it's the mach setup because even if I write to code with the lathe wizard It wants to do the same thing. I noticed that the lathe screen says radius mode but can not find how to change it to diameter mode.
Thanks Brian
-
Config, ports and pins, turn options and you can change from rad to dia there.
Hood
-
my computer didn't like that change , it shut down after I changed it.
Brian
-
is it ok now? Make sure the setting stuck as if its not shut down properly the setting wont be saved.
Hood
-
ok,
It stuck, still didn't look right so I unchecked "Reversed arcs in front post". Now the cut view looks right, only it looks a little streched out.
Brian
-
That was going to be the next setting i suugested you look at but you got there yourself :)
Hood
-
Hood,
works great now . Here is proplem number 2, I am using sound logics combo board and I have a 6 position turret on the A axis. How do I control the turret under mach turn?
Thanks Brian
-
A axis?
It will depend on how your turret works as to how you connect it, mine id hydraulic and uses combinations of limit switches to show the tool position and other limits to show when its clamped, unclamped, rotated etc etc. I need quite a lot of I/O between the turret, Front Toolpost, Gearchange etc so I got a PLC. You may not need so much so maybe the parallel ports will provide enough. Not sure what the combo board is, better have a look see LOL
Hood
-
Hi,
Ok, I can handle the lathe end contols. I guess what I need to know is If in Mach turn you change tools from 1 to 4 how do you get a special code out to pin 5 that tells a microcontroller to change to tool 4 ?
Thanks,
Brian
-
You write a custom M6 macro, this will look at what the present tool is and do whatever is needed to get the next tool into position. Without knowing how your changer will be set up then I cant say how yours will work. Below is a couple of tools worth from mine, it will give you the idea of what the macro will need to be like. As I said I have a PLC and the ladder in it does the actual tool change routine and just tells Mach when its done. If you are doing it purely by outputs then you may need to use Brains or you may manage within the macro.
Hood
'Toolchange macro for Computurn 290
If GetSelectedTool <1 Then 'If tool called is less than 1
MsgBox("Tool Out Of Range") 'show message
End 'End macro
End If
If GetSelectedTool >10 Then 'If selected tool is greater than 10
MsgBox("Tool Out Of Range") 'Show message
End 'End macro
End If
If GetselectedTool = GetCurrentTool Then 'If selected tool is the same as current tool then end macro
End
End If
If GetSelectedTool=1 Then 'If selected tool = 1
Do 'Start loop
Call SetModOutput (9,1) 'Toolchange signal to PLC to start turret indexing
If GetInput (0) Then Exit Do 'Correct tool in position signal from PLC and exit loop
Loop 'Continue loop if above signal is not present
End If
Call SetModOutput (9,0) 'Cancel tool change signal to PLC
If GetSelectedTool=2 Then 'If selected tool = 2
Do
Call SetModOutput (9,1)
If GetInput (1) Then Exit Do
Loop
End If
Call SetModOutput (9,0)