Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started by: stefangem on September 03, 2025, 07:07:08 AM

Title: LUA Change Version, Problem with signal Script
Post by: stefangem on September 03, 2025, 07:07:08 AM
I have Problem with lua signal script up to Mach4 V6105.

this has no funktion in the screen load script.



[mc.ISIG_INPUT17] = function (state)

local inst = mc.mcGetInstance()

if (state == 1) then

mc.mcCycleStart(inst)

mc.mcCntlSetLastError(inst, "Cycle Start")

end

end



What is change?in the Mach4 V5036 has function without problem.

Regards
Stefan
Title: Re: LUA Change Version, Problem with signal Script
Post by: stefangem on September 04, 2025, 10:20:10 AM
I have self found.

SigLib[mc.ISIG_INPUT17] = function (state)
if state == 1 then
local inst = mc.mcGetInstance()
mc.mcCntlCycleStart(inst)
mc.mcCntlSetLastError(inst, "Cycle Start")
end
end

this is new: SigLib[mc.ISIG_INPUT17] = function (state) and mc.mcCntlCycleStart(inst)
not more [mc.ISIG_INPUT17] = function (state) and mc.mcCycleStart(inst)