Translations:Полезные программы/5/en

Материал из WebHMI Wiki
Перейти к: навигация, поиск

-- checking condition ---------- if not startBit then

   tmrStartTime = now; -- save timer start 
   WriteReg("TON_out", 0); -- timer output 
       if curTmrState == 1 then 
	     -- actions on 1 - 0 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>