You can rotate the coordinate system in Mach3 to match your part using G68 I think. But you'll need to figure out the angle to rotate to.
Does any Mach3 (or other NC package) allow for the aligning of the computer part axis to the physical part?
I'm not talking about just zeroing the axis. I'm talking about having the x axis (and y and z) line up with the part, so that when the NC software moves in the new X direction, it actually moves along the side of the part not just along the table axis.
So in essence you'd be creating a virtual coordinate system to which mach3 would run.
adrian.
Similar Threads:
Last edited by outsider787; 02-28-2012 at 10:31 AM.
You can rotate the coordinate system in Mach3 to match your part using G68 I think. But you'll need to figure out the angle to rotate to.
Gerry
UCCNC 2017 Screenset
[URL]http://www.thecncwoodworker.com/2017.html[/URL]
Mach3 2010 Screenset
[URL]http://www.thecncwoodworker.com/2010.html[/URL]
JointCAM - CNC Dovetails & Box Joints
[URL]http://www.g-forcecnc.com/jointcam.html[/URL]
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Here's how I do that.
I have my own screenset with a lot of useful buttons/macros. You will also need to add new buttons to your screenset.
Assume I have a clear zero mark on my physical part, and a line along desired X or Y.
Step 1. I get the part zero by using a ring probe, a camera or just visually aligning any tool with a pointed tip. X and Y are zeroed.
Step 2. I position a tool on the other end of the line (by the same means) but not alter X and Y.
Step 3. Current coordinates are copied to the dedicated DROs - I have a button for that. The code below assumes they are #1002 and 1003.
Step 4. A special button (I call it "Calc Angle") executes the following code.
If you answer Yes, the computed angle will be in effect for machining. Otherwise, it just displays the result.Code:dx = GetUserDRO( 1002 ) dy = GetUserDRO( 1003 ) Pi = atn( 1 ) * 4 If Abs( dx ) > Abs( dy ) Then ' horizontal, near X axis angle = atn( dy / dx ) Else ' vertical, near Y axis angle = atn( - dx / dy ) End If angle = angle / Pi * 180 ret = MachMsg("A = " & roun(angle) & "° - set?", "Axis Rotation", 4) If ret = 6 Then ' Yes SetOEMDRO(118, angle) 'Code("G68X0Y0R" & angle) End If Message("A = " & roun(angle) & "°")
NOTE: if you have to interrupt the work and restart the system, the part offset are saved, but the axis rotation is reset. Hopefully the user DROs are preserved, and all you have to do is Step 4 above.
Hello it is very useful tool i take to use
it is possible to insert in the code this function" regen tollpath" ?
Tanks
it is work fine fantastic
tanks for all
hello i have insert two line in the code "dooembutton (1017) and dooembutton (160)" but the macro not execute the line "dooembutton (1017)"if i run the macro with vb script editor step by step all is OK i do not why? anybody have an answer ?
dx = GetoemDRO( 800 )
dy = GetoemDRO( 801 )
Pi = atn( 1 ) * 4
If Abs( dx ) > Abs( dy ) Then ' horizontal, near X axis
angle = atn( dy / dx )
Else ' vertical, near Y axis
angle = atn( - dx / dy )
End If
angle = angle / Pi * 180
ret = MachMsg("A = " & roun(angle) & "° - set?", "Axis Rotation", 4)
If ret = 6 Then ' Yes
SetOEMDRO(118, angle) 'Code("G68X0Y0R" & angle)
dooembutton (1017) 'go to zero
dooembutton (160) ' regen toolpath
End If
Message("A = " & roun(angle) & "°")
I didn't check it in real environment, just guessing...
Try to insert a small delay before and/or after "dooembutton (1017)". Actually setting DROs takes time - maybe within 0.5 s or so.
i try to insert a delay with WScript.Sleep " " but an error message appear :error on line 18 object does support this property or method
dooembutton (1017) 'go to zero
While IsMoving()
Wend
dooembutton (160) ' regen toolpath
Gerry
UCCNC 2017 Screenset
[URL]http://www.thecncwoodworker.com/2017.html[/URL]
Mach3 2010 Screenset
[URL]http://www.thecncwoodworker.com/2010.html[/URL]
JointCAM - CNC Dovetails & Box Joints
[URL]http://www.g-forcecnc.com/jointcam.html[/URL]
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
tanks it seem to work
Thank you brownfox, I learned a lot from your sample. I'm going to update my screen with some DROs.
Hello,
I'm using this code for sheet alignment, it works great for aligning sheet, but when I'm cutting a part and I need to pause the cut and then when I want to re-cut the machine it leaves a stall position in the machine and does not cut the play as you should.
What could be wrong, some configuration or some other problem?