Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Bill_O on July 28, 2020, 05:25:57 PM
-
In Mach3 there was a delay you could set for the spindle to get (up or down) to speed before the file started to run.
I am unable to find a similar setting in Mach4 .
Or do I need to make a custom m3 and use mcSpindleSetAccelTime?
Thanks,
Bill
-
Check the spindle tab on the config screen, you may need to scroll left to see it.
-
Graham,
I feel like a real idiot.
I looked at that page 10 times and never looked at the column headings.
I just looked at the bottom.
thanks,
bill
-
In a situation where you don't have feedback to mach4 of the actual RPM coming from the VFD, how do you make sure the spindle waits to spool up before moving? Do you check that "override" option only? I tried this last night and my code still just started ripping before the spindle was even ready.
-
devinw,
I ended up making a custom m3.
This has some extra things in it for my machine but it might help.
Bill
function m3()
local inst = mc.mcGetInstance()
--Get Spindle On and Spindle Auto handles
local hSpin = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON)
local hreg = mc.mcRegGetHandle(inst, 'iRegs0/SpindleAuto')
--Get spindle on state
local SpinOn = mc.mcSignalGetState(hSpin)
--Get Spindle Auto value
local SpinVal = mc.mcRegGetValue(hreg)
if (SpinVal == 0) then
mc.mcSignalSetState(hSpin, 0)
--wx.wxMessageBox('Spindle OFF')
else
if (SpinOn == 0) then
mc.mcSignalSetState(hSpin, 1)
wx.wxMilliSleep(5500)
--wx.wxMessageBox('Spindle ON')
end
end
end
if (mc.mcInEditor() == 1) then
m3()
end
-
devinw,
I ended up making a custom m3.
This has some extra things in it for my machine but it might help.
Bill
function m3()
local inst = mc.mcGetInstance()
--Get Spindle On and Spindle Auto handles
local hSpin = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON)
local hreg = mc.mcRegGetHandle(inst, 'iRegs0/SpindleAuto')
--Get spindle on state
local SpinOn = mc.mcSignalGetState(hSpin)
--Get Spindle Auto value
local SpinVal = mc.mcRegGetValue(hreg)
if (SpinVal == 0) then
mc.mcSignalSetState(hSpin, 0)
--wx.wxMessageBox('Spindle OFF')
else
if (SpinOn == 0) then
mc.mcSignalSetState(hSpin, 1)
wx.wxMilliSleep(5500)
--wx.wxMessageBox('Spindle ON')
end
end
end
if (mc.mcInEditor() == 1) then
m3()
end
Nice, I'm sure that works, but that is pretty advanced for me lol. I'm gonna have to read up a LOT to even understand what's going on there :D.
-
devinw,
This might help in the understanding.
Go to the bottom to get the newest version.
https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695
(https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695)
-
devinw,
This might help in the understanding.
Go to the bottom to get the newest version.
https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695
(https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695)
Thanks! I will read that . Much appreciated