Translations:Полезные программы/5/en
Материал из WebHMI Wiki
Версия от 08:26, 3 мая 2018; Evgeniy.mozoliak (обсуждение | вклад)
-- checking condition ---------- if not startBit then
tmrStartTime = now; -- save timer start WriteReg("TON_out", 0); -- timer output if curTmrState == 1 then -- actions on 0 - 1 transition end return 0
else
if (now - tmrStartTime) > TIMER_DELAY then -- actions upon timer trigger WriteReg("TON_out", 1) if curTmrState == 0 then -- actions on 1 - 0 transition end end -- if
end -- if end -- main </syntaxhighlight>