IsTransmissionDone

Evaluate "transmission done" flag

This function returns the value of the "transmission done" flag. The "transmission done" flag is TRUE if the specified number of bytes has been sent from the assigned communication port of the PLC. New data may be sent or received. Any send instruction turns the "transmission done" flag to FALSE and no data can be received.Evaluation of the "transmission done" flag may be useful in cases where no response can be expected, e.g. with broadcast messages.

Parameters

Input

Port (WORD, INT, UINT)

Specifies the communication ports depending on the PLC type:

  • COM port e.g. SYS_COM0_PORT

  • Ethernet port e.g. SYS_ETHERNET_USER_CONNECTION_1

  • MCU/SCU e.g. 16#xx01 (xx = slot number) in COM01

Output

IsDone (BOOL)

TRUE, if the end code has been received. The end code is specified in the system registers.

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;
		bTransmissionIsDone: 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,IsTransmissionDone!,,6,1,16,4,,?DPort?CIsDone);
B(B_VARIN,,iPort,4,2,6,4,);
B(B_VAROUT,,bTransmissionIsDone,16,2,18,4,);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

bTransmissionIsDone:=IsTransmissionDone(Port := iPort);

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