BRK

Break

The BRK (Breakpoint) instruction stops the execution at the address of this instruction during the test run mode if the trigger EN is in the ON-state.

Remarks

  • Once this instruction is executed, the program halts. To continue the program, the mode in the test run (continuous run / step run) should be selected. In the step run mode, the program is executed instruction by instruction regardless of the instructions and in the continuous run mode, the program is executed until it is stopped by the next break instruction (BRK) or the end of the program (end instruction ED).

  • The test run mode is executed, when the mode selector switch on the PLC is set to RUN mode with setting the INITIALIZE/TEST switch to the TEST mode.

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		start: BOOL:=FALSE;
	END_VAR

POU body

When the variable start is set to TRUE, the function is carried out.

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_F,BRK!,Instance,8,1,14,4,,?DEN?AENO);
B(B_CONTACT,,start,3,2,5,4,);
L(1,3,3,3);
L(5,3,8,3);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF start then
    BRK();
END_IF;

Modified on: 2019-01-25Feedback on this pagePanasonic hotline