Comments

Introduction

You can use comments to annotate your code, which helps others to understand the intention of the program or function.

Comments can be placed in any location where a space is acceptable. Comments are not significant in terms of program execution.

Single Line Comments

Single line comments begin with two consecutive forward slash (/) characters. The rest of the text in the line, up to and including the end of line, is the comment.

Example 1:

PumpState := FALSE; // Turn off the pump

Example 2:

// Calculate flow rate:

Multiple Line Comments

Multiple line comments begin with a left parenthesis (() character followed by an asterisk (*) character. All of the text up to the next asterisk (*) character followed by a right parenthesis character ()) is treated as a comment.

Example 1:

(* Calculate flow rate *)

Example 2:

(*
* Calculate flow rate
*)

Standards Compliance

Table 3.1 - IEC 61131-3 Second Edition.

Table 3.1 & 3.2a - IEC 61131-3 Third Edition.

Further Information

Common Elements

To learn about other IEC 61131-3 Common Elements.

Glossary

For the meaning of terms used in Fernhill SCADA.