CODESYS is the market-leading IEC 61131-3 automation platform that is independent of device manufacturers. Since 2016, the Kempten-based software company offers an add-on for static code analysis that conveniently supports the development of control logic. This add-on has now been fundamentally revised and improved.
Potential errors in syntactically correct application code of control projects, so-called "code smells", can cause enormous damage - especially as they generally do not become visible before runtime. For example, there may be incorrect memory accesses via arrays or pointers; incorrectly formulated conditions can lead to unreachable code. The affected code parts are difficult to locate manually. Static code analysis offers a remedy by examining application code according to predefined rules and by identifying problematic parts. In addition, code quality can be measured according to various metrics.
The new version 5.0 of CODESYS Static Analysis makes it even easier to improve IEC 61131-3 application code. The so-called constant propagation has been integrated for this purpose. This feature can predict variable values used in the code. CODESYS Static Analysis uses these variable values to report severe problems in the code directly upon input: Thus, erroneous array accesses, divisions by 0, and null pointer accesses can be avoided very reliably. The tool becomes a programming assistant that detects "code smells" during development and provides suitable quick tips for correcting them. In addition, the new procedure ensures significantly more targeted messages - and thus fewer "wrong" finds. In addition, completely new checks can now be performed, most notably an index check for array accesses without code enlargement. Automatically generated metrics also help to increase code quality, such as cognitive complexity, the number of lines of code copied ("clone rate"), and the automatic extraction of methods and functions.
The new CODESYS Static Analysis will be demonstrated live at the SPS trade show and is available for purchase in the CODESYS Store.
CODESYS at the SPS trade show 2023: Hall 7, Booth 677
Press contact:
Roland Wagner
CODESYS GmbH
A member of the CODESYS Group
Memminger Str. 151
87439 Kempten
Germany
Tel.: +49-831-54031-17
E-Mail: r.wagner @codesys.com