How would you name the variable 'is running'?
IS_RUNNINGis_runningIs_runningIs_RunningisRunningIsRunningis-runningIs Running 😱😱😱isRngIs_rngThis document provides the coding style for the PLC code that makes up the core of PLC Framework.
If you have noticed, there is no single style for programming PLCs, and the problem is fundamentally that each provider names their elements as they see fit. Additionally, the first PLC programmers were not high-level code programmers (C, C++, Java, Python, etc.) but mostly electrical or electronic engineers, so each one programmed as best they could.
What do I mean? Each programmer, team, company has their way of naming variables, constants, data types, functions, etc. There is no clear separation between function, subroutine, and not to mention the incorrect use of the term macro.
This situation does not happen with other developers, such as backend, frontend, they work with frameworks and clear and specific code style guides.
How would you name the variable 'is running'?
IS_RUNNINGis_runningIs_runningIs_RunningisRunningIsRunningis-runningIs Running 😱😱😱isRngIs_rngHow would you name the constant 'status done'?
status_doneStatus_DoneSTATUS_DONEstatusDoneSTATUS-DONEstatusDoneAnd so, until exhausting all possibilities, all logical, all lawful, and yet without clear rules 😔.
For us, coding style is as important as the code itself. That is why the first chapters of the documentation will be dedicated to coding style.
The coding style of our framework is based on the following styles: