Skip to main content

Programming in the Page-Oriented Editor

Note

You commit to the implementation language when creating the POU. Afterwards, it is not possible to switch between the Continuous Function Chart (CFC) and Continuous Function Chart (CFC) - page-oriented implementation languages.

The "Continuous Function Chart (CFC) - page-oriented" implementation language is a variant of CFC. The difference from simple CFC is that the code can be distributed on any number of "pages" in the editor. In this way, you can create extensive function block diagrams which are still easy to print. Each page has edge areas where you arrange the connections to the other pages.

  • Creating pages

  • Setting the page size

  • Copying and inserting pages in the page navigator

  • Copying the implementation of a POU in the CFC implementation language and inserting into a page

  • Well-structured and space-saving arranging of inputs, outputs, and connection marks in the border areas

  • Connection over pages with connection marks

cfc_img_pged_block_diagram.png
  1. Page navigator

  2. Page header with name and description

  3. Left border area reserved for inputs and sink connection marks

  4. Program area

  5. Right border area reserved for outputs and source connection marks

Configuring the editor

You can configure the appearance, behavior, and printing for the entire project in the CODESYS options in the CFC Editor category. For example, on the View tab, you can configure the color of the connecting lines depending on the data type.

Editing

You can drag a Page element from the Toolbox view to the page navigation. Then an additional page is inserted.

You can select existing pages in the page navigation and click Edit → Copy and Edit → Paste to duplicate them.

The size of the page is changed by means of the Edit Page Size command.

Connections over multiple pages are established by means of the Connection Mark – Source and Connection Mark – Sink elements. When you drag a connecting line from an input pin or an output pin to the border area, a new connection mark is created automatically. The advantage is that the "List components" input assistance provides all previously defined connection mark sources.

If you have selected an element in the editor, then you can use the arrow keys to move the selection from one element to the next to navigate through the circuit. If you then select a connection mark and press another arrow key, even the corresponding connection mark of the next/previous page will be selected.

You can transfer networks from a CFC POU to the program area of a page-oriented CFC by clicking Edit → Copy and Edit → Paste (from the clipboard). Alternatively, you could also use Drag&Drop.

Execution Order

The execution order is determined automatically according to the order of the pages as the pages are sorted in the page navigator of the editor. Within a page, a page-oriented CFC object behaves like a CFC object. Therefore, you can switch between Auto Data Flow Mode and Explicit Execution Order Mode.

Additional commands in the CFC page-oriented editor

When you use the page-oriented editor, the CFC menu also provides the Edit Page Size and Edit Worksheet commands.