In industrial automation, like in any other serious business, stability of the process is of key importance. Programmer cannot write a stable programm code unless he fully understands the task and its function in complete industrial process. Additional knowledge about the installed hardware can help the programmer to understand what are the operating ranges and where the process can be best controlled.
Rarely the standard engineering schematics are enough. As we jump from project to project in different fields of application, there are additional explanations required. During the discussions with mechanical & electrical engineers we usually figure out that there is a sensor missing or that there is no description about a specific process in the plant. Well, sometimes things are easier solved in teams :)
So in order to get things really going for a lot of years to come, following points should be respected:
- Get a good overview of the process and installed hardware,
- Read the docs, discuss with engineers and iron out last uncertainties,
- Prepare yourself clear, nicely readable programm structure.
- Start the implementation.
- When the programm is running, perform all posibble tests (and fix errors).
It is important that boundary conditions are tested as well. For example - what if process temperature is outside of the termometer range? Answers to such questions make a difference between a stable control system and a problematic one. As you see, I marked one item in bold. Programm structure is important and I intend to focus on it in the following posts.
Don't forget about the code comments - There is no such thing as "self explainable code".