Glossary · Automation software engineering and architecture
Source code
Also known as: Code
German: Quellcode
In software engineering, source code is the human-readable form of a program, written in a programming language such as C, Python or the IEC 61131-3 languages, from which object code or executables are generated.
- Software engineering
In one sentence
Source code is the human-readable form of a program in a programming language, from which executable code is generated.
Example
The PLC source code is exported as structured text files and stored in Git, so changes can be reviewed line by line.
How it applies
- Engineering: Source code is the primary engineering artifact and belongs under version control. Graphical PLC languages and engineering tool projects may need export or tool support to be versioned and compared.
- Delivery: Contracts define whether customers receive source code, for example to maintain the machine themselves, and under which license.
- Documentation: Comments in source code are the basis for generated API references. Code examples in manuals should be taken from tested source, not typed by hand.
Source code vs. object code
Source code is written and read by people. Object code is generated by a compiler for machines; it cannot easily be reviewed or modified.