Creating source code in IEC

Source code

“Source code” indicates the implementation code, which you add to the programming blocks with the aid of the corresponding programming language editors.

Programming language

When you create a programming block, you can decide which implementation language you want to use for the programming. In addition to the IEC languages, CFC is also available.

Programming language editors

A programming block can be opened for editing in the corresponding programming language editor by double-clicking the object in the PLC project tree. The function block therefore appears either in the text-based ST Editor or in one of the graphical editors for FBD/LD/IL, SFC or CFC. Each editor consists of two windows: The upper window is used for the declarations, either in text-based or tabular form, depending on the setting. The lower window is used for the implementation code. The display and the behavior of each editor can be configured for the entire project in the corresponding tab of the TwinCAT options.

Note the option to open a programming block in offline in the editor, even when the application is in online mode. (Command Edit object (offline))

See also: