Valuta il flag "IsMasterCommunicationActive"
Questa istruzione restituisce il valore del flag "IsMasterCommunicationActive".
Ingresso
Specifica le porte di comunicazione (in base al tipo di PLC):
Porta COM p.es. SYS_COM0_PORT
Porta Ethernet p.es. SYS_ETHERNET_USER_CONNECTION_1
MCU/SCU p.es. 16#xx01 (xx = numero slot) in COM01
Il flag "IsMasterCommunicationActive" può essere valutato con una delle seguenti variabili di sistema:
sys_bIsComPort0MasterCommunicationActive
sys_bIsComPort1MasterCommunicationActive
sys_bIsComPort2MasterCommunicationActive
Per le porte di comunicazione che non supportano la funzione master, il flag è sempre TRUE.
Tutte le variabili di ingresso e uscita utilizzate per programmare questa funzione sono state dichiarate nell'intestazione del POU. La stessa intestazione del POU è utilizzata per tutti i linguaggi di programmazione.
VAR
iPort: INT:=0;
bIsMasterCommunicationActive: 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,IsMasterCommunicationActive!,,5,1,19,4,,?DPort?C);
B(B_VARIN,,iPort,3,2,5,4,);
B(B_VAROUT,,bIsMasterCommunicationActive,19,2,21,4,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
bIsMasterCommunicationActive:=IsMasterCommunicationActive(Port := iPort);