Skip to content

Functions

  1. Always start with an underscore _.

  2. Subsequent words start with uppercase letters.

  3. Do not use underscores _ between words.

  4. Numbers from 0 to 9.

  5. 🐫 Lower camel case with a small variant, point 3.

    _functionName
  6. ❗ If the function is related to Safety, the name starts with F_:

    F_functionName
// ✅ Correct:
FUNCTION | FUNCTION_BLOCK "_functionName"... // ← Name
_queue...
_inPosition...
_esc...
_background...
_checkSensor...
_alarmBit...
// ❌ Wrong:
Queue...
IN_POSITION...
esc...
check_sensor...
func_check_sensor...
check_sensor_fun...
...

We know that in PLC there is no fixed standard for the name of functions as a concept in itself. For us, it is important to know when we are using a function or not. We have seen many libraries from various providers, and each names them in their own way. Our purpose is to unify the nomenclature. We know that _function() may seem strange at first glance, as in other high-level languages like Python and JavaScript, the underscore is interpreted as private.