-

Comments

Comments are treated different in the different code worksheet types.

Comments in FBD/LD and SFC

You can use comments for documentation purposes. Comments are only an aid to interpret the application program. They do not affect the behavior of the programmed application logic. There is no restriction for the number of comments within the program.

Comments can be inserted into a code worksheet either at a free position or attached to an existing object. When moving an object with an attached comment, the comment is moved correspondingly. Comments can be inserted via toolbar button in the code worksheet toolbar or via in-place button.

To edit a comment, double-click it, enter the desired text into the appearing input field (to create a new line within the comment, press <Shift>+<Enter>) and press <Enter> or left-click outside the comment input box to confirm.

Pressing the command in-place button of a comment opens the 'Edit Font' dialog box where you can edit the font settings such as the font family, font color, font style.

Note
Free and attached comments in FBD/LD and SFC are limited to 2048 characters.

What do you want to do?

Insert a comment at a free position

Insert a comment attached to an existing object

Comments in NOLD and SNOLD

In NOLD/SNOLD worksheets, comments are only allowed for entire networks (sections). Free and attached comments as described for FBD/LD worksheets are not supported in NOLD/SNOLD.

The network comment is shown together with the network label in the horizontal bar which borders the code section at the top of the network. On creation of a new section, a default network label is created which can be edited and optionally, a comment can be entered in the bar.

To edit the network label or the comment, first left-click the respective text in the section bar and then click the in-place button. The 'Edit Object' command is also available in the context menu.

Note
The network label is used as jump label in NOLD (in SNOLD only supported if FVL language profile is set). If you modify a network label, you have to edit the related jumps accordingly. Affected jumps are marked red in the code. Example: