Introduction

In the IL and ST editors, comments start with the string (* and end with the string *). Any comment can be entered between these two strings.

NOTE: Keep in mind that each change to a comment (e.g. change to a comment text, change to the size of the text object) makes it necessary to recreate the section involved (Generation > Generate project).

In accordance with IEC 61131-3, nesting of comments is not permitted. If it is necessary to nest comments you must enable them via the Tools > Project Settings dialog box, in the Language extensions tab by activating the Allow nested comments check box.

Placing a new comment

Placing a comment:

Step

Action

1

Place the cursor at the target position.

2

You have the following options for placing a comment:

  • Use the Edit > New > Comment menu command.

  • Use the Comment menu command from the shortcut menu.

  • Press the F8 key.

    or

  • Select the symbol.

Result: The strings for the start and end of the comments are inserted.

Example:

3

Enter the comment between the two strings.

Example:

Executing Text Comments

Placing a comment:

Step

Action

1

Select the command text to be executed.

Example:

2

You have the following options for placing a comment:

  • Use the Edit > New > Comment menu command.

  • Use the Comment menu command from the shortcut menu.

  • Press the F8 key.

    or

  • Select the symbol.

Result: The strings for the start and end of the comments are inserted.

Example: