Block comments are written above the block declaration. Member comments are written above the interface member. The following example shows a Function with documentation comments:
NAMESPACE DocumentComments
///FunctionWithDocComments has block and member comments
FUNCTION FunctionWithDocComments : Int ///This comment will be ignored
VAR_INPUT
//This comment will be ignored
////This comment will be ignored
///member comment for input1
/// member comment for input1
input1: array[0..3] of real; ///member comment for [ref1]
///member comment for [ref1]
ref1: REF_TO INT;
END_VAR
VAR_output///member comment for "output1"
///member comment for "output1"
output1: char;
end_Var
;
END_FUNCTION
END_NAMESPACE
Documentation comments created in SIMATIC AX can displayed for the following elements in TIA Portal:
- Blocks
- Block interface members
- Library types
- Versions of library types