Evaluate "F145/F146 not active" flag
This instruction returns the value of the "F145/F146 not active" flag. It is TRUE if the execution of an F145 or F146 instruction is possible because neither instruction is active.
Input
Communication port: 1, 2
Evaluation of the "F145/F146 not active" flag
The F145 or F146 instructions can only be executed if neither instruction is active. Evaluate the "F145/F146 not active" flag in your program to check the state of the instructions. The flag can be evaluated using one of the following instructions or system variables:
IsF145F146NotActive
sys_bIsComPort1F145F146NotActive
sys_bIsComPort2F145F146NotActive
For communication ports not supporting the master function, the flag is always TRUE.
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
iPort: INT:=0;
bF145F146NotActive: 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,IsF145F146NotActive!,,6,1,17,4,,?DPort?C);
B(B_VARIN,,iPort,4,2,6,4,);
B(B_VAROUT,,bF145F146NotActive,17,2,19,4,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
bF145F146NotActive:=IsF145F146NotActive(Port := iPort);