3591
Mach4 General Discussion / Re: Need help with M6 Macro, translating from Mach3 to Mach4
« on: October 06, 2018, 06:35:34 PM »
Hi,
in the temp folder put this code, note that it overwrites the previous version of ISIG_INPUT3 entry:
If you are happy with this then it is time to put it in its final location, namely the screenload script in the signal library SigLib{}.
Open the screen editor, and then expand the screenload script and note the SigLib{} table near the top. Paste in your two
new entries.
Craig
in the temp folder put this code, note that it overwrites the previous version of ISIG_INPUT3 entry:
Code: [Select]
mc.ISIG_INPUT3]=function(state)
local hreg=mc.mcRegGetHandle(inst,'iRegs0/ToolIndex')
if state==1 then
mc.mcRegSetValue(hreg,1)
else
mc.mcRegSetValue(hreg,0)
end
end,
[mc.ISIG_INPUT4]=function(state)
local hreg=mc.mcRegGetHandle(inst,'iRegs0/ToolPosition')
if state==1 then
mc.mcRegSetValue(hreg,1)
else
mc.mcRegSetValue(hreg,0)
end
end,
Note that after each table entry a comma is required to separate the next entry.If you are happy with this then it is time to put it in its final location, namely the screenload script in the signal library SigLib{}.
Open the screen editor, and then expand the screenload script and note the SigLib{} table near the top. Paste in your two
new entries.
Craig