Hello Guest it is May 28, 2026, 04:57:01 PM

Recent Posts

Pages: 1 2 3 4 5 6 7 8 9 10
1
General Mach Discussion / Re: xbox controller
« Last post by Charlie_M on May 28, 2026, 05:06:57 AM »
What plugin are you using?
2
MachPro General Discussion / Re: RC ATC Dustboot
« Last post by cd_edwards on May 27, 2026, 11:40:10 AM »
I get no messages. I renamed the UserMCodeModuleDefault.mcs to UserMCodeModule.mcs  added your two functions on a clean install of MachPro and made sure I had Open-Close set. As far as I can tell, it never attempts to run those two functions.

3
MachPro General Discussion / Re: RC ATC Dustboot
« Last post by paul.stephens on May 26, 2026, 11:57:04 AM »
Run the following script, let me know if you have any Message Boxes come up. On Local testing, I have no issues with this.

Make sure that your "Tool Changer Dust Cover Behavior" is set to a value of "Open-Close" While running a Tool Changer. I had my Tool Changer set to manual for this test. --- Be careful that you're not just modifying the "Tool Setter Dust Cover Behavior" setting.

Code: [Select]
function UserMCodeModule.TC_PreOpenDustCover()
wx.wxMessageBox("Pre Open Dust Cover")
return nil, true, w.FunctionCompleted()
end
function UserMCodeModule.TC_PreCloseDustCover()
wx.wxMessageBox("Pre Close Dust Cover")
return nil, true, w.FunctionCompleted()
end
4
MachPro General Discussion / Re: RC ATC Dustboot
« Last post by cd_edwards on May 25, 2026, 09:20:24 AM »
I spent the weekend attempting to get this working in my UserMCodeModule.mcs   it doesn't seem to matter what I set the tool dust cover settings to, this code will not run via invoking M6. It will run with M112/M113

Code: [Select]
function UserMCodeModule.TC_PreOpenDustCover()
------------------ Add user code below this line ------------------
-- Two persistant registers are needed. One tracks location of the dust boot (docked/undocked), the other set's an ignore flag.

local inst = mc.mcGetInstance()
local DustBootX = 45.79
local DustBootY = 36.4
local DustBootZ = -4.443
local DustBootRateY = 75
local DustBootRateZ = 100
local DustBootYSlide = 5
local DustBootSafeZ = -0.1


local hreg = mc.mcRegGetHandle(inst,"iRegs0/DustBoot/ignoreDustBoot")
local ignore = mc.mcRegGetValue(hreg)
local hreg = mc.mcRegGetHandle(inst,"iRegs0/DustBoot/DustBootStatus")
local val = mc.mcRegGetValue(hreg)

if (ignore == 1) then
mc.mcCntlSetLastError(inst, "Dust boot ignore")
do return nil, false, w.FunctionCompleted()end
end

if val == 0 then
mc.mcCntlSetLastError(inst, "Dust boot already dropped")
return nil, true, w.FunctionCompleted()
end
-- =========================================================== drop dust boot =============================================================================

GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootSafeZ) ------ Z Up
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode =  string.format("G00 G90 G53 X%.4f Y%.4f\n", DustBootX, DustBootY) ------ TO DUSTSHOE ENTRY Y
mc.mcCntlGcodeExecuteWait(inst, GCode)

-- We need to make sure that we don't wipe out the dust boot dock when moving both x/y
GCode =  string.format("G00 G90 G53 Z%.4f\n", DustBootZ) ------ TO DUSTSHOE ENTRY
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode = string.format("G0 G90 G53 Y%.4f F%.4f\n", DustBootY - DustBootYSlide,DustBootRateY) ------ MOVE Y INTO DUSTSHOE HOLDER
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootSafeZ) ------ PICK UP Z --- DROP SHOE IN HOLDER --
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode =  string.format("G00 G90 G53 Y%.4f \n", DustBootY) ------ MOVE TO SAFE Y
-- mc.mcCntlGcodeExecuteWait(inst, GCode)
mc.mcRegSetValue(hreg, 0)
return nil, true, w.FunctionCompleted()

end

function UserMCodeModule.TC_PreCloseDustCover()
------------------ Add user code below this line ------------------

local inst = mc.mcGetInstance()

local DustBootX = 45.79
local DustBootY = 36.4
local DustBootZ = -4.3513
local DustBootRateY = 100
local DustBootRateZ = 50
local DustBootYSlide = 5
local DustBootSafeZ = -0.1

local hreg = mc.mcRegGetHandle(inst,"iRegs0/DustBoot/ignoreDustBoot")
local ignore = mc.mcRegGetValue(hreg)
local hreg = mc.mcRegGetHandle(inst,"iRegs0/DustBoot/DustBootStatus")
local val = mc.mcRegGetValue(hreg)

if (ignore == 1) then
mc.mcCntlSetLastError(inst, "Dust boot ignore")
do return nil, false, w.FunctionCompleted()end
end
--  ============================================================ PICKUP DUST SHOE ==========================================================================
local toolnum, rc = mc.mcToolGetCurrent(inst)
    if (toolnum == 0 or rc ~= 0 or val == 1) then
mc.mcCntlSetLastError(inst, "Dust boot already picked up")
do return nil, false, w.FunctionCompleted()end
end

GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootSafeZ) ------ Z UP
mc.mcCntlGcodeExecuteWait(inst, GCode) ------ Z UP

GCode =  string.format("G00 G90 G53 X%.4f Y%.4f\n", DustBootX, DustBootY-DustBootYSlide) ------ To DustShoe Entry X
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootZ+0.75) ------ G00 Quick down to 20mm above DustShoe Pick Up
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode = string.format("G00 G90 G53 Z%.4f F%.4f\n", DustBootZ,DustBootRateZ/2) ------ DustShoe Pick Up
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode = string.format("G00 G90 G53 Y%.4f F%.4f\n", DustBootY,DustBootRateY) ------ DustShoe SlideOutY
mc.mcCntlGcodeExecuteWait(inst, GCode)

GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootSafeZ) ------ PICK UP Z --- DROP SHOE IN HOLDER --
mc.mcCntlGcodeExecuteWait(inst, GCode)
mc.mcRegSetValue(hreg, 1)

------------------ Don't Edit below this line -----------------------

return nil, true, w.FunctionCompleted()
end
5
Probes and Tool Setters / Re: MachPro Probing Wizard
« Last post by cd_edwards on May 24, 2026, 04:26:08 PM »
better version based off the original.
6
Probes and Tool Setters / Re: MachPro Probing Wizard
« Last post by cd_edwards on May 24, 2026, 11:35:07 AM »
Thanks to Claude, here is a modified mcTouchOff.lua files which a Z height for each probe. I have 3 that I use. 3d probe (has to be G31 as BLUM only works on G31), XYZ touch plate with centering hole. And a wireless setter.

Use at your own risk but it seems to work as advertised.
7
Mach4 General Discussion / Signal vfd broche
« Last post by Davdesloges on May 24, 2026, 12:56:54 AM »
Hello,
Mach4 and Pokeys57
I configured my spindle (Kress) for 0-10V and it works perfectly with the Pokeys57 software.

Under Mach4, it doesn't work when changing the speed, for example, M3 S15000.
In the table for configuring the minimum and maximum RPM, if I set 5000 for the minimum, the spindle rotates at 5000 RPM.
There's no calculation for the PWM output speed ratio.
I'm a bit stuck...

Bonjour,
Mach4 et pokeys57
J ai configuré ma broche (Kress) en 0-10V marche très bien avec le logiciel Pokeys57
Sous Mach4 ne fonction pas en changeant la vitesse par  exemple M3 S15000
Dans le tableau pour configuré le mini et max rpm, ci je mets 5000 pour le mini, la broche tourne a 5000 t/min
Il n y a pas de calcul pour le rapport vitesse sortie Pwm
Je coince un peu...
8
MachPro General Discussion / Re: RC ATC Dustboot
« Last post by paul.stephens on May 22, 2026, 01:06:11 PM »
To keep your M codes consistent between your machines, you can keep this MCode. If you want to only run it when a Dust Cover Routine is called. Set your settings to tool changer settings, and have tool changer dust cover behavior set to Open - Close. Then run these two hook scripts.
UserMCodeModule.TC_PreOpenDustCover()
UserMCodeModule.TC_PreCloseDustCover()

This will run your routine before and after every tool change. This also will affect the Dust Cover dashboard routine as well. I believe the standard routine is running M112 as the Mcode deep down. So if you're not overwriting M112, the hooks should work as intended.

Example:

Code: [Select]
function UserMCodeModule.TC_PreCloseDustCover()


 -- Dustshoe Entry Settings
    local inst = mc.mcGetInstance()

    local DustBootX = 45.85   
    local DustBootY = 36.4
    local DustBootZ = -4.3513
    local DustBootRateY = 100
    local DustBootRateZ = 50
    local DustBootYSlide = 5   
    local DustBootSafeZ = -0.1

--  ============================================================ PICKUP DUST SHOE ==========================================================================   
   local toolnum, rc = mc.mcToolGetCurrent(inst)
    if (toolnum == 0 or rc ~= 0) then
      do return end
   end

   GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootSafeZ)                                       ------ Z UP
   mc.mcCntlGcodeExecuteWait(inst, GCode)                                       ------ Z UP

   GCode =  string.format("G00 G90 G53 X%.4f Y%.4f\n", DustBootX, DustBootY-DustBootYSlide)                                  ------ To DustShoe Entry X
   mc.mcCntlGcodeExecuteWait(inst, GCode)

   GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootZ+0.75)                                 ------ G00 Quick down to 20mm above DustShoe Pick Up
   mc.mcCntlGcodeExecuteWait(inst, GCode)

   GCode = string.format("G00 G90 G53 Z%.4f F%.4f\n", DustBootZ,DustBootRateZ/2)                     ------ DustShoe Pick Up
   mc.mcCntlGcodeExecuteWait(inst, GCode)

   GCode = string.format("G00 G90 G53 Y%.4f F%.4f\n", DustBootY,DustBootRateY)      ------ DustShoe SlideOutY
   mc.mcCntlGcodeExecuteWait(inst, GCode)

   GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootSafeZ)                                                             ------ PICK UP Z --- DROP SHOE IN HOLDER --
   mc.mcCntlGcodeExecuteWait(inst, GCode)
end   


This should auto run the routine before the official "Close Dust cover" which means after your Tool Change, it will run this routine Next automatically.
9
MachPro General Discussion / Re: Spindle reverse
« Last post by paul.stephens on May 22, 2026, 12:08:03 PM »
In short, unmodified - the M4 command runs mc.MC_SPINDLE_REV in the core which fires the OSIGs Spindle On and Spindle Reverse.

"Sometimes, after an error with the MDI, you need to restart machpro. It will do nothing and you can't seem to clear the error until a restart."
Could you provide the Error code you get and what the MDI you're trying to run?
10
MachPro General Discussion / Re: Spindle reverse
« Last post by cd_edwards on May 20, 2026, 12:59:08 PM »
No I am not doing anything specific for M3/M4. Today, it's working again. installed 19.2, and tried a M4S700 and spindle started. Yesterday I rewrote some code that autoload's and unloads a probe which is has a dock and pogo pins for electrical.

Sometimes, after an error with the MDI, you need to restart machpro. It will do nothing and you can't seem to clear the error until a restart.
Pages: 1 2 3 4 5 6 7 8 9 10