Hello Guest it is November 12, 2019, 10:32:52 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - secretspy711

Pages: 1 2 »
I almost got that one but it's a little too tall for my application.

Thank you, this is exactly what I needed.

Without tool holders, I think you are right to keep the tool table values at zero.  It doesn't really make any sense to populate them when they will be different every time.

The tool probe I made has some compliance, so probing fast isn't a problem, but the touch surface is bare aluminum which is too soft and probing too fast causes marks on it.  I either need to anodize that surface, or perhaps make one from steel.

I went to that location, and the link to the help desk (under Free Email Support) doesn't work either.  I get "waiting for support.machsupport.com" indefinitely.  Shall I use the "contact-us" page instead?

I am trying to get the following script to work, which is based on the one from here: https://www.youtube.com/watch?v=6-4JkDv9AgM.
I am having some trouble figuring out how to get it to actually update the Z axis DRO using the difference between the current and selected tool length offsets.  Can someone please help?

Code: [Select]
local inst = mc.mcGetInstance()

--change lines here to either auto rapid, or manually jog to a tool change position
--Manual Lines. Uncomment line below to allow you to manually jog to a tool change position.
--local MyChoice = wx.wxMessageBox("Click OK, \nThen Jog to A Safe Tool Change Position,\nInsert New tool,\nThen Click Cycle Start.","Click OK to continue" , 16)
--Auto Lines.  Uncomment both lines below (and comment out local MyChoice line above) to automatically move to tool change position.
--Edit to include the machine coordinate values of that tool change position.

mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0")--Move Z all the way up.
mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X-16 Y-12")--Move to X, Y Coords for tool change position.
mc.mcCntlSetLastError(inst, 'Now in Tool Change Position. Hit Cycle Start!')
local posmode = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_3) --get the current mode so we can return to it when macro ends
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)
local currenttoollen = mc.mcToolGetData(inst, mc.MTOOL_MILL_HEIGHT, currenttool)
if selectedtool == currenttool then
mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
wx.wxMessageBox("1. Change to tool " .. tostring(selectedtool) .. "\n2. Then press Cycle Start to perform auto TLO" )
mc.mcCntlToolChangeManual(inst, true);
mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedtool) .. "   Previous Tool == " .. tostring(currenttool))
mc.mcToolSetCurrent(inst, selectedtool)

local MyChoice =
--wx.wxMessageBox("Click Ok to Begin Probing the New Tool","Click OK to continue" , 16)
mc.mcCntlSetLastError(inst, "Probing in Progress!")
mc.mcCntlGcodeExecuteWait(inst, " G90 G53 G0 X-.4 Y-.54")--go to TLO position
mc.mcCntlGcodeExecuteWait(inst, " G91 G1 Z-3 F30")--go down a little to save time.
mc.mcCntlGcodeExecuteWait(inst, " G91 G31 Z-2 F5")--probe the new tool fast
mc.mcCntlGcodeExecuteWait(inst, " G91 G1 Z.125 F30")--pull off the touch pad a little
mc.mcCntlGcodeExecuteWait(inst, " G91 G31 Z-.135 F2")--probe the new tool slow

local probedz =
mc.mcCntlGetPoundVar(inst, mc.SV_PROBE_POS_Z) -- Z Probe position in Machine coords
mc.mcCntlGcodeExecute(inst, string.format('G ' .. posmode))--return to pre macro mode G90, or G91
mc.mcCntlGcodeExecuteWait(inst, "G00 G53 Z0 ")--Retract
local NewOffset = probedz
mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, selectedtool, NewOffset)
mc.mcCntlSetLastError(inst, string.format("Auto tool setting complete, Offset = %.4f", NewOffset))
wx.wxMessageBox("Toolchange Complete.\nTLO Set")


if (mc.mcInEditor() == 1) then

PLEASE fix the search function, even if temporary!  I am hamstrung without it.  I paid for a product and I expect to be able to use it to its full extent.  Trying to code lua scripts without being able to find examples on the forum is just ridiculous.

General Mach Discussion / Re: Is this a "look ahead" problem?
« on: December 26, 2018, 10:47:22 AM »
Thanks for the replies!

I am indeed running Constant Velocity right now.  I'll first try increasing the acceleration values a bit.  I've never tried Exact Stop before, but I'll give it a shot as well.

General Mach Discussion / Is this a "look ahead" problem?
« on: December 26, 2018, 02:16:56 AM »
I'm getting this weird corner on a part I machined today in polycarbonate.  It's supposed to be round, just like the adjacent corner and in the model, but it's like the machine started turning the corner too early and then created this sharp-ish corner instead of a nice round.  The opposite corner did the same thing.  Also the radius on the lower section looks too large.

Could this be due to the # of look-ahead lines being too low, or the motor acceleration values being too low?

Backlash compensation is turned OFF.

Images here:

Nevermind, I see that it does.  Now its just a matter of getting my CAM post processor to put "/" on the lines I want.

Does Mach4 have a "skip optional block" function?
For example, on a Haas machine, if a block of gcode has a "/" before each line, all of those lines are optional and can be skipped by the operator.

The closest functionality I have found is to insert a M00 or M01 before the block I want to be optional, with a comment that tells the operator to manually skip to the next op if desired.  But that's a little cumbersome.

Mach4 Toolbox / Re: M6: how to add manual spindle RPM with tool change?
« on: October 04, 2018, 01:41:19 AM »
here's a better one that also tells me what dial setting on my Makita

Code: [Select]
function m3()
inst = mc.mcGetInstance()
commandrpm = mc.mcSpindleGetCommandRPM(inst)

function round(num, numDecimalPlaces)
local mult = 10^(numDecimalPlaces or 0)
return math.floor(num * mult + 0.5) / mult

makitasetting = round((((5/20010)*commandrpm)-1.396),2)
mc.mcCntlSetLastError(inst, 'SpindleClockwise')
mc.mcSpindleSetDirection(inst, 1)

wx.wxMessageBox("Set spindle to " .. tostring(commandrpm) .. " RPM (dial #" .. makitasetting ..")\nThen press Cycle Start to continue" )
mc.mcCntlToolChangeManual(inst, true)


if (mc.mcInEditor() == 1) then

Pages: 1 2 »