Skip to content

Standard function blocks

logiccloud provides the IEC 61131-3 standard function blocks as built-in, ready-to-instantiate types. You do not declare their bodies — you declare an instance of the type in a VAR section and call it like any other function block instance.

VAR
debounce : TON; // an instance of the on-delay timer
END_VAR
debounce(IN := sensor, PT := T#200ms);
IF debounce.Q THEN
// sensor has been stable for 200 ms
END_IF

This reference is split by category. Each category page lists every function block in that group with its signature, I/O table, timing behavior and a usage example.

  • TimersTP (pulse), TON (on-delay), TOF (off-delay) and their typed variants.
  • CountersCTU (count up), CTD (count down), CTUD (count up/down) and their typed variants.
  • Edge detectionR_TRIG (rising edge) and F_TRIG (falling edge).
  • BistablesSR (set-dominant) and RS (reset-dominant) latches.