I'm currently working on a rotary post for a centroid acorn plasma They have pre-programmed macros for OnPenUp and OnPenDown will those still work with the rotary plugin or do I have to make sure all those commands are done with-in the post?
here is what the post currently has:
`function OnPenDown()
post.Text ("M61\n")
end
function OnPenUp()
post.Text ("M62\n")
end`
Rotary plugin and Macros within control
Re: Rotary plugin and Macros within control
Guessing you will want them in the post since it will need to calculate the z moves for the tubing dimensions.
Re: Rotary plugin and Macros within control
There is no reference command in that post either, my other idea was to do the standard rotary post with this as the reference function
function Reference()
firstRef = false
local matZ = sc.QueryDll(qryCHKEND, endY, dllId)
post.ModalText(" m38")
post.Eol()
M38 is a macro I edited so that it just references z then travels up to pierce height, to the best of my knowledge centroid does not have a probing gcode
I'm gessing that local matZ = sc.QueryDll(qryCHKEND, endY, dllId) is making sure that there isnt a collision when safe height traveling to a new reference location with anything other than round tubing? So really I need a straight probing command for centroid and do the rest through sheetcam's post.
function Reference()
firstRef = false
local matZ = sc.QueryDll(qryCHKEND, endY, dllId)
post.ModalText(" m38")
post.Eol()
M38 is a macro I edited so that it just references z then travels up to pierce height, to the best of my knowledge centroid does not have a probing gcode
I'm gessing that local matZ = sc.QueryDll(qryCHKEND, endY, dllId) is making sure that there isnt a collision when safe height traveling to a new reference location with anything other than round tubing? So really I need a straight probing command for centroid and do the rest through sheetcam's post.
- Les Newell
- Site Admin
- Posts: 3675
- Joined: Thu May 11, 2006 8:12 pm
Re: Rotary plugin and Macros within control
Do you know what the M61 and M62 macros are actually doing?
The problem with rotary cutting is that if you are cutting anything other than round tube the surface height varies depending on the angle. For that reason SheetCam uses z=0 as the centre of rotation, not the surface. This code:
is getting the current calculated surface height, taking the angle of rotation into account. If your M61 macro zeros the Z axis on the surface of the tube you can use this value to add an offset after referencing so that the Acorn's coordinate system matches SheetCam's coordinate system.
The problem with rotary cutting is that if you are cutting anything other than round tube the surface height varies depending on the angle. For that reason SheetCam uses z=0 as the centre of rotation, not the surface. This code:
Code: Select all
local matZ = sc.QueryDll(qryCHKEND, endY, dllId)
Re: Rotary plugin and Macros within control
Right now my custom macro in centroid does a touch reference, sets z zero at the top of the material and raises the torch at .08" above the material. I don't believe I can keep the torch at z0 because the macro is checking for no continuity between the ohmic sensor and the material. If I'm thinking about this correctly I'll just treat that new .08" Like the float switch offset value and I should be good to go.
Code: Select all
function Reference()
firstRef = false
local matZ = sc.QueryDll(qryCHKEND, endY, dllId)
post.ModalText(" m38")
post.Eol()
post.ModalText(" G92 Z")
post.Number ((matZ + switchOffset) * scale, "0.0000")
post.Eol()
- Les Newell
- Site Admin
- Posts: 3675
- Joined: Thu May 11, 2006 8:12 pm
Re: Rotary plugin and Macros within control
Yes, that should work, as long as the M38 macro always leaves the torch at 0.08". If not add a G0 move to the switch offset.