As illustrated above, this Basic Function Block type provides examples of multi-line comments on:
- Event and Data I/O
- ECC elements
- An ST Algorithm
The text fragments below illustrate the use of multi-line comments in the IEC 61131-3 Structured Text (ST) language, and their translation into the Java® language for the Function Block Runtime (FBRT) platform.
ALGORITHM REQ IN ST : (* Normally executed algorithm A multi-line comment on an Algorithm *) //Test 1 (* Test 2 *) /* Test 3 */ (* Test 4 *) /* Test 5 */ QO := QI; //Test 6 // Test 7 (* Test 8 *) /* Test 9 */ //This used to cause a bug in Java code END_ALGORITHM
/** ALGORITHM REQ IN ST * Normally executed algorithm * A multi-line comment * on an Algorithm */ public void alg_REQ(){ //Test 1 /* Test 2 */ /* Test 3 */ /* Test 4 */ /* Test 5 */ QO.value = QI.value; //Test 6 // Test 7 /* Test 8 */ /* Test 9 */ //This used to cause a bug in Java code }