ArticleslgStudy

science

CODESYS

CODESYS is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand CODESYS rather than just read about it. In short: Codesys (spelled “CODESYS” by the manufacturer, previously “CoDeSys”) is an integrated development environment for programming controller applications according to the international industrial standard IEC 61131-3. CODESYS is developed and marketed by the CODESYS Group that is headquartered in Kempten.

CODESYS — main illustration
CODESYS — illustration

Key takeaways

  • CODESYS belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect CODESYS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of CODESYS from memory before moving on to harder problems.

Reference excerpt

Codesys (spelled “CODESYS” by the manufacturer, previously “CoDeSys”) is an integrated development environment for programming controller applications according to the international industrial standard IEC 61131-3. CODESYS is developed and marketed by the CODESYS Group that is headquartered in Kempten. The company was founded in 1994 under the name 3S-Smart Software Solutions. It was renamed in 2018 and 2020 to Codesys Group / Codesys GmbH. Version 1.0 of CODESYS was released in 1994. Licenses of the CODESYS Development System are free of charge and can be installed legally without copy protection on further workstations.

Integrated use cases The tool covers different aspects of industrial automation in one surface:

Engineering The five programming languages for application programming defined in the IEC 61131-3 are available in the CODESYS development environment.

IL (instruction list) is an assembler-like programming language. The IEC 61131-3 user organization PLCopen has declared this language as “deprecated”, which means it shall not be used for new projects anymore. ST (structured text) is similar to programming in Pascal or C LD (ladder diagram) enables programmers to virtually combine relay contacts and coils FBD (function block diagram) enables users to rapidly program both Boolean and analog expressions SFC (sequential function chart) is convenient for programming sequential processes and flows Additional graphical editor available in CODESYS:

CFC (Continuous Function Chart) is a sort of freehand FBD editor. While the FBD editor works in a network-oriented way and arranges the function blocks automatically, in CFC it is possible to place all function blocks freely and thus also to realize feedback without intermediate variables. Therefore, this language is also particularly suitable for the overview representation of an application. Integrated compilers transform the application code created by CODESYS into native machine code (binary code) which is then downloaded onto the controller. The most important 32- and 64-bit CPU families are supported, such as TriCore, 80x86/iX, ARM/Cortex, PowerPC or Loongson. Once CODESYS is connected with the controller, it offers an extensive debugging functionality such as variable monitoring/writing/forcing by setting breakpoints/performing single steps or recording variable values online on the controller in a ring buffer (Sampling Trace) as well as core dumps during exceptions. CODESYS V3.x is based on the so-called CODESYS Automation Platform, an automation framework device manufacturers can extend by their own plug-in modules. The CODESYS Professional Developer Edition offers the option to add components to the tool which are subject to licensing, e.g. integrated UML support, a connection to the version control systems Apache Subversion and Git, online runtime performance analysis ("Profiler"), static code analysis of the application code or script-based automated test execution. With the CODESYS Application Composer, which partly can be used free of charge, users can have complete automation applications generated as part of the IEC 61131-3 tool. To do this, they can configure their machine or system on the basis of modules that define, for example, the mechatronic structure or the software function to be used, including the entire functionality. From this configuration, an integrated configurator generates viewable IEC 61131-3 code.

Runtime After implementing the CODESYS Control Runtime System, intelligent devices can be programmed with CODESYS. A fee-based toolkit provides this runtime system as source and object code. It can be ported to different platforms. Since the beginning of 2014, a runtime version has also existed for all the Raspberry Pi versions. However, this does not guarantee hard real-time characteristics. The Raspberry Pi interfaces, such as I²C, SPI and 1-Wire are supported in addition to the Ethernet-based field buses. Furthermore, SoftPLC systems under Windows and Linux are available, which turn industrial PCs and other standard device platforms from different manufacturers such as Janztec, WAGO, Siemens or Phoenix Contact into CODESYS-compatible controllers. These SoftPLC systems can also be operated as virtual PLCs in virtualization platforms, such as software containers and hypervisors in real-time.

Fieldbus technology Different field buses can be used directly in the programming system CODESYS. For this purpose, the tool integrates configurators for the most common systems such as PROFIBUS, CANopen, EtherCAT, PROFINET and EtherNet/IP. For most of the systems mentioned, protocol stacks are available in the form of CODESYS libraries which can be loaded subsequently onto the supported devices. In addition, the platform provides optional support for application-specific communication protocols, such as BACnet or KNX for building automation or DNP3 for process automation.

Communication For the exchange of data with other devices in control networks, CODESYS can seamlessly integrate and use communication protocols. These include proprietary protocols, standardized protocols in automation technology, such as OPC and OPC UA, standard protocols for serial and Ethernet interfaces as well as standard protocols of web technology, such as MQTT or https. The latter are also offered in the form of encapsulated libraries for simplified access to public clouds from AWS or Microsoft (Azure).

Visualization An integrated editor helps users to create complex visualization masks directly in the programming system CODESYS and animate them based on application variables. To simplify the procedure, integrated visualization elements are available. In addition, canvas (HTML5) elements can also be integrated and animated. An optional toolkit enables users to create their own visualization elements. The masks created are, among others, used for application tests and commissioning during online operation of the programming system. With optional visualization clients, the created masks can also be used to operate the machine or plant, e.g. on controllers with integrated display (product name CODESYS TargetVisu), in an own portable runtime e.g. under Windows or Linux (product name CODESYS HMI) or in an HTML5-capable web browser (product name CODESYS WebVisu). For simplified use, a free Android app is available for Codesys WebVisu (product name CODESYS Web View).

… excerpt ends here. Continue reading the full article.

Illustrations

CODESYS illustration

Worked examples

Example 1 — a first encounter with CODESYS

Start with the simplest possible case. Write down what CODESYS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to CODESYS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about CODESYS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of CODESYS

In research
CODESYS appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses CODESYS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
CODESYS is common in secondary-school and first-year university syllabi. It links to neighbouring topics Industrial automation, Programmable logic controllers, so understanding it makes those chapters shorter.
In everyday life
Look for CODESYS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “CODESYS” →

How to study CODESYS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what CODESYS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain CODESYS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is CODESYS in simple terms?

Codesys (spelled “CODESYS” by the manufacturer, previously “CoDeSys”) is an integrated development environment for programming controller applications according to the international industrial standard IEC 61131-3. CODESYS is developed and marketed by the CODESYS Group that is headquartered in Kemp…

Why does CODESYS matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study CODESYS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on CODESYS.

Tags

  • Industrial automation
  • Programmable logic controllers

Keep exploring