Hello Guest it is March 28, 2024, 05:42:11 AM

Author Topic: spindle dwell before run  (Read 960 times)

0 Members and 1 Guest are viewing this topic.

Offline Bill_O

*
  •  562 562
    • View Profile
spindle dwell before run
« 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

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: spindle dwell before run
« Reply #1 on: July 28, 2020, 09:22:02 PM »
Check the spindle tab on the config screen, you may need to scroll left to see it.

Without engineers the world stops

Offline Bill_O

*
  •  562 562
    • View Profile
Re: spindle dwell before run
« Reply #2 on: July 29, 2020, 08:48:29 AM »
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
Re: spindle dwell before run
« Reply #3 on: August 03, 2020, 02:52:49 PM »
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.

Offline Bill_O

*
  •  562 562
    • View Profile
Re: spindle dwell before run
« Reply #4 on: August 03, 2020, 04:39:52 PM »
devinw,

I ended up making a custom m3.
This has some extra things in it for my machine but it might help.

Bill

Code: [Select]
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
Re: spindle dwell before run
« Reply #5 on: August 04, 2020, 11:35:13 AM »
devinw,

I ended up making a custom m3.
This has some extra things in it for my machine but it might help.

Bill

Code: [Select]
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.

Offline Bill_O

*
  •  562 562
    • View Profile
Re: spindle dwell before run
« Reply #6 on: August 04, 2020, 12:21:51 PM »
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
Re: spindle dwell before run
« Reply #7 on: August 04, 2020, 12:34:42 PM »
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


Thanks! I will read that . Much appreciated