Hello,
can someone please help me with the code bellow. I have two led's on my screen named T01LED and T02LED and I want them to light up when tool number changes. I've put this code in PLC but it doesn't work. Thanks.
local inst = mc.mcGetInstance()
local currenttool = mc.mcToolGetCurrent(inst)
if (currenttool == "1") then
scr.SetProperty("T01LED", "Value", "1")
else
scr.SetProperty("T01LED", "Value", "0")
end
--------------------------
if (currenttool == "2") then
scr.SetProperty("T02LED", "Value", "1")
else
scr.SetProperty("T02LED", "Value", "0")
end
Regards,
Peter