IsMasterCommunication

Evaluate "IsMasterCommunication" flag

This instruction returns the value of the "IsMasterCommunication" flag.

Parameters

Input

Port (WORD, INT, UINT)

Communication port: 1, 2

Ethernet user connection: port 1–216

Remarks

Evaluation of the "IsMasterCommunication" flag. The flag can be evaluated using one of the following system variables:

  • sys_bIsComPort0MasterCommunication

  • sys_bIsComPort1MasterCommunication

  • sys_bIsComPort2MasterCommunication

  • sys_bIsEthernetUserConnection1 ... 216MasterCommunication

    For communication ports not supporting the master function, the flag is always TRUE.

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
		iPort: INT:=0;
		bIsMasterCommunication: BOOL:=FALSE;
	END_VAR

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,IsMasterCommunication!,,10,1,22,4,,?DPort?C);
B(B_VARIN,,iPort,8,2,10,4,);
B(B_VAROUT,,bIsMasterCommunication,22,2,24,4,);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

bIsMasterCommunication:=IsMasterCommunication(Port := iPort);

Modified on: 2022-01-18Feedback on this pagePanasonic hotline