Page 1 of 1

Rotary plugin and Macros within control

Posted: Mon Jan 30, 2023 5:48 pm
by scotg1107
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`

Re: Rotary plugin and Macros within control

Posted: Mon Jan 30, 2023 5:51 pm
by djreiswig
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

Posted: Mon Jan 30, 2023 5:58 pm
by scotg1107
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.

Re: Rotary plugin and Macros within control

Posted: Tue Jan 31, 2023 12:12 pm
by Les Newell
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:

Code: Select all

local matZ = sc.QueryDll(qryCHKEND, endY, dllId)
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.

Re: Rotary plugin and Macros within control

Posted: Sat Feb 04, 2023 11:22 pm
by scotg1107
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()
   

Re: Rotary plugin and Macros within control

Posted: Mon Feb 06, 2023 11:51 am
by Les Newell
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.