Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Blacksmith on July 09, 2015, 11:43:40 AM
-
is it's possible to program a external cycle start in mach4
-
short n sweet. Yes, using the input signals from your bob.
DazTheGas
-
its in the Mach4 scripting manual under manuals on the mach web site
-
Thank you, it's working
-
This may sound funny, but can you put the code on this thread? When I copy and paste from the .pdf my application puts in lots of line breaks and funny stuff. I don't know if everyone has this problem.
Thanks,
Peter
-
it looks like this
local inst = mc.mcGetInstance();
if (sig == mc.OSIG_MACHINE_ENABLED) then
machEnabled = state;
end
if (sig == mc.ISIG_INPUT1) and (state == 1) then
local inst = mc.mcGetInstance()
mc.mcCntlCycleStart(inst)
end
local inst = mc.mcGetInstance();
if (sig == mc.ISIG_INPUT6) and (state == 1) then
local inst = mc.mcGetInstance()
mc.mcCntlCycleStop(inst)
end
-
and it has to go in to the "signal script"
-
Works - yeaaaaaa. I had to map my Input B on smartBob to input 1 on Mach4.
Dose this script also allow me to program a feed hold on Input 6?
Thanks,
Peter
-
yes what ever you wont you could have it do, it`s just scripting needed if you get the M4 scripting manual it has how to do tables in it
-
Works - yeaaaaaa. I had to map my Input B on smartBob to input 1 on Mach4.
Dose this script also allow me to program a feed hold on Input 6?
Thanks,
Peter
Yep - the Pause or Feedhold works on Input 6.