Oh I got ya now, thanks again
I was toggling the led but not the modbus output
yes it takes time to get your head around it I still have a lot of scripts to try to figure out to get the machine running the way I would like .... But it can be done (allot of trial and error mostly error for me
)
actual script from buttons on my screen set ...this does work!!
--OUTPUT 5
--Get the instance of the controller
local inst= mc.mcGetInstance();
--Get the out5 handle
local out5= mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5);
--Output TOGGLE
local outstate = mc.mcSignalGetState(out5);
if (outstate == 1) then
mc.mcSignalSetState(out5, false);
else
mc.mcSignalSetState(out5, true);
end
--OUTPUT 8
--Get the instance of the controller
local inst= mc.mcGetInstance();
--Get the out8 handle
local out8= mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT8);
--Output TOGGLE
local outstate = mc.mcSignalGetState(out8);
if (outstate == 1) then
mc.mcSignalSetState(out8, false);
else
mc.mcSignalSetState(out8, true);
end