Good to Know

Preview Video acess to individual Bits
Access to individual bits in numeric variables

Access to single bits in variables with integer data type (SINT | INT | DINT | LINT | USINT | UINT | UDINT | ULINT | BYTE | WORD | DWORD | LWORD ). Use the following syntax:
<Variablennname>.<Bitnummer>
This allows you, for example, to retrieve bits from variables that have previously been encoded into them or to detect the +/- sign of an INT variable.

CODESYS Clip: Access to individual bits in numeric variables

Bausteine vom Übersetzen in CODESYS ausschließen
Excluding POUs from compilation

You are working on a more complex automation project in CODESYS and have just created a new POU. If this POU is not free of syntactical errors, the entire project can no longer be compiled. Right-click on the POU to configure its properties and exclude it from compilation in the "Build" tab. The device is then displayed in a special color in the devices tree and your project can be compiled despite the syntactical errors in the POU.

Quick instantiation in CFC

If you want to instantiate and call a known function block (e.g. TON, CTU or motion POU) in a CFC editor, you only have to type in the name in the editor and press <Enter> three times.

CODESYS Clip: Quick instantiation in CFC

Searching in the device tree

In large CODESYS projects with many objects, it may be difficult to keep an overview in the device or POU tree.

Simply typing on the keyboard opens a search window and you can find the desired objects by entering parts of the name just like in internet search engines. Double-click on the location to jump directly to the desired POU.

Editing column by column

Press the ALT key and use the mouse to select columns in the declaration part or in text editors. Texts marked in this way can be deleted or edited in one go, e.g. by typing in new variable names.

CODESYS Clip: Editing column by column

Screenshot CODESYS Quick declaration of variables
Quick declaration of variables with standard data types

To quickly create BOOL variables, use [Variable Name] <Ctrl> + <Enter> in the declaration part of the program editors.

If you want to declare variables of type UINT, INT, WORD, DINT, LINT, STRING, TIME or REAL, add the first letter of the type after the variable name and Space, and then also press <Ctrl> + <Enter>.

CODESYS Clip: Quick declaration of variables with standard data types

Styles CODESYS
Visualization styles
In case you want to be able to quickly and easily switch the look and feel of a visualization to quite different requirements, use visualization styles.
F4 CODESYS
F4 Key

If the project cannot be translated due to syntactic errors or if there are other messages in the message window, you can systematically process the list of messages by pressing F4. CODESYS immediately jumps to the place in the source code belonging to the message.

Online Config Mode CODESYS
Online Config Mode
With the Online Config Mode you can test the wiring and function of configured I/Os or drives before having written a real application. Right-click on the device tree and select "Online Config Mode".
Jobs @ CODESYS