{"id":"iec-ton","model_id":"TON","name":"CODESYS TON","summary":"TON is a function block that implements an on-delay timer. A rising edge on IN starts the delay counter, and Q becomes TRUE after the delay time PT has elapsed while IN remains TRUE. A falling edge on IN resets the delay counter.","study_notes":["Declared as a function block instance, for example TONInst : TON;","Called in ST as TONInst(IN := VarBOOL1, PT := T#5s);","Output Q is read as TONInst.Q."],"safety_notes":[],"sources":[{"url":"https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74406539.html","title":"Beckhoff Information System","accessed":"2026-10-26"},{"url":"https://content.helpme-codesys.com/en/libs/Standard/Current/Timer/TON.html","title":"CODESYS Group","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":15,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"structured_text","code":"TON","group":"Timer","syntax":"TONInst(IN := VarBOOL1, PT := T#5s);","parameters":[{"name":"IN","data_type":"BOOL","description":"Rising edge starts delay counter. Falling edge resets delay counter."},{"name":"PT","data_type":"TIME","description":"Time for the delay counter [ms]."},{"name":"Q","data_type":"BOOL","description":"FALSE if IN is FALSE; TRUE if IN is TRUE and delay time PT elapsed."},{"name":"ET","data_type":"TIME","description":"Elapsed time since rising edge at IN."}],"dialect":"CODESYS","related":[],"standards":[]},"url":"https://machineschema.com/instruction/iec-ton","license":"https://creativecommons.org/licenses/by/4.0/"}