Alternative out
The function inverts the output condition each time the rising edge of the input signal is detected.
Input
input signal
Output
inverted output signal
When the mode is changed from “PROG” to “RUN” or the power is turned on in “RUN” mode while the input signal is TRUE, a rising edge will not be detected for the first scan.
MC to MCE instruction
JP to LBL instruction
F19_SJP to LBL instruction
LOOP to LBL instruction
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
input_value: BOOL:=FALSE;
output_value: BOOL:=FALSE;
END_VAR
VAR
input_value: BOOL:=FALSE;
output_value: BOOL:=FALSE;
END_VAR
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,ALT!,Instance,8,0,13,3,,?Di?Co);
B(B_VARIN,,input_value,6,1,8,3,);
B(B_VAROUT,,output_value,13,1,15,3,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
output_value:=(ALT(input_value));