Hi,
even reversing the high / low status in Mach4 is not good.
the pump starts up until Mach4 is not active, then goes off.
this is the code.
----------Toggle Coolant M8----------------
[mc.ISIG_INPUT7] = function (state)
if (state == 0) then
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_COOLANTON);
local sigState = mc.mcSignalGetState(sigh);
if (sigState == 0) then
local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
mc.mcSignalSetState(OSigCool,1)
mc.mcCntlSetLastError(inst, "Coolant On")
else
local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
mc.mcSignalSetState(OSigCool,0)
mc.mcCntlSetLastError(inst, "Coolant Off")
end
end
end,