 F19_SJP
F19_SJPIndirect jump to label
Jumps to the label LBLs with the same number as the data stored in the area specified by s if the trigger EN is in the ON-state.

Input
Stores label number (0 to 255)
The range of the number s can be between 0 and 255.

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;
		_label: INT:=1;
		Counter: INT:=0;
	END_VARWhen the variable start is set to TRUE, the function is carried out.


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,F19_SJP!,Instance,9,0,15,4,);
B(B_VARIN,,_label,7,2,9,4,);
B(B_CONTACT,,Start,3,1,5,3,);
L(1,2,3,2);
L(5,2,9,2);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 3 ;
        NETWORK_BODY
B(B_F,@ADD-2!,Instance,8,0,13,3,,?D?D?C);
B(B_VARIN,,Counter,6,0,8,2,);
B(B_VARIN,,1,6,1,8,3,);
B(B_VAROUT,,Counter,13,0,15,2,);
L(1,0,1,3);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL := 1: ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_F,@ADD-2!,Instance,8,2,13,5,,?D?D?C);
B(B_VARIN,,Counter,6,2,8,4,);
B(B_VARIN,,1,6,3,8,5,);
B(B_VAROUT,,Counter,13,2,15,4,);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY
(* if Start is true Counter will be incremented by 1, else by 2 *)
IF Start then
    F19_SJP(_label);
END_IF;
Counter:=Counter+1;
LBL(1);
Counter:=Counter+1;| LD | Start | (* EN = start; Starting signal for the F19_SJP function. *) | 
| F19_SJP | _label | (* s = Var_0 (contains the number of the label LBL) *) | 
| ST | Counter | (* option *) |