Example 11 Example (*! @summary a program with a simple counter This is a sample program in which I will increase a counter variable. Of course the description of this program could be longer than one line *) //! @param iCount2 variable to increase the counter PROGRAM MAIN VAR btest AT%Q* : BOOL; //! A sample variable not needed for this POU iCount2 : INT; // This is my internal comment which will not be visible in the docu myPOU : POU; //! This is a sample of a FB instanciated within this program END_VAR (*! This sample shows how to increase the variable iCount2 . The following code can be used to increase $iCount: iCount2:=iCount2+1; *) //!
@summary sample function block for the PS meeting FUNCTION_BLOCK FB_Cylinder IMPLEMENTS ICylinder VAR_INPUT bTest :BOOL; END_VAR VAR //! @param tTimerValue internal TIME variable that is being accessed via property "P_Timervalue" (Get/Set) tTimerValue : TIME := T#500MS; //internal comment iState : INT; //! state of the state machine bAtLeftPosFbk : BOOL; //internal comment bAtRightPosFbk : BOOL; //! software watchdog to reach the end position TimerReach : TON; //! software watchdog to reach the end position TimerStart : TON; //! Start timer END_VAR //! regular FB that additionally implements an interface "ICylinder" TE1030 33 Version: 1.3.3