ST Comments
Comment | Description | Example |
---|---|---|
Single-line | There are two ways of marking:
In CODESYS, these comments are handled the same way. However, if library documentation is created using the LibDoc Scripting Collection, the following applies:
|
|
Multiline | Starts with |
|
Nested | Starts with |
|
The comments are displayed as information on a variable in the comment column of the variable declaration in online mode, as well as in the tooltip when the mouse pointer is positioned over a variable. The following logic and prioritization apply:
When a comment beginning with
///
is before the variable, this comment is displayed.When a comment beginning with
//
or within(**)
is after the variable declaration in the same line, this comment is displayedWhen a comment beginning with
//
or within(**)
is before the variable declaration in the same line, this comment is displayed
If a comment cannot be displayed in full in online mode due to its length, then the symbol is displayed in this comment field. When the cursor is then positioned over this symbol, the complete comment is displayed in the tooltip.
A tooltip in the header of a POU is defined by the following comment: // tooltip text – line 1 // tooltip text – line 2 // tooltip text – line 3 Afterwards the documentation is defined as follows: /// reStructuredText
Note: The different comment types can be used to control which comments should be displayed in the documentation of a library and which comments are intended only for library developers.