Functions
Naming Rules
Section titled “Naming Rules”-
Always start with an underscore
_. -
Subsequent words start with uppercase letters.
-
Do not use underscores
_between words. -
Numbers from
0to9. -
🐫
Lower camel casewith a small variant, point 3._functionName -
❗ If the
functionis related toSafety, the name starts withF_:F_functionName
Examples
Section titled “Examples”// ✅ 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......Why _ for naming functions?
Section titled “Why _ for naming functions?”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.