I have read where there is a screen load script?
Where is this file located. I have searched the settings and the directory and have found nothing that screams here I am...
Is it the MachPlc.mcs file?
If so, is this where I would insert the code to run Brian's Sig file like this:
SigLib = {
--Enable
[mc.OSIG_MACHINE_ENABLED] = function (state)
machEnabled = state;
end,
--HeadUp
[mc.ISIG_INPUT1] = function (on_off)--mc.ISIG_INPUT1
if( on_off==1 ) then
-- On
else
-- Off
end
end,
--HeadDn
[mc.ISIG_INPUT2] = function (state)--mc.ISIG_INPUT2
if( state == 1 ) then
-- On
else
-- Off Call A function here if you wanted
end
end,
[mc.ISIG_INPUT3] = function (state)--mc.ISIG_INPUT3 --Used as an enable button
if( state == 1 ) then
local inst= mc.mcGetInstance();
local reg = mc.mcSignalGetHandle(inst, mc.OSIG_MACHINE_ENABLED)
state = mc.mcSignalGetState(reg);
if(state == 1)then
state = 0
else
state = 1
end
mc.mcCntlEnable(inst, state);
end
end,
[mc.ISIG_INPUT4] = function (state)--mc.ISIG_INPUT2 button to do feed hold
if( state == 1 ) then
local inst= mc.mcGetInstance();
mc.mcCntlFeedHold(inst)
end
end,
[mc.ISIG_INPUT5] = function (state)--mc.ISIG_INPUT2
if( state == 1 ) then
CycleStart() --Run my cycle start function
end
end
}