SendData

SendData 1:

Interface

VAR_INPUT
    pSendData : POINTER TO BYTE;
    Length : UDINT;
END_VAR
VAR_OUTPUT
    Busy : BOOL;
    Error: ComError_t;
END_VAR
VAR_IN_OUT
    TXbuffer: ComBuffer;
END_VAR

Description

SendDatasends the contents of a variable of any type to the interface corresponding to the input variable TxBuffer. For as long as Busy=TRUE, the transmission is not completed. The data has successfully been sent when Busy=FALSE and Error=0.

pSendData

pSendData is the address of the send data, and is determined by means of ADR(send data).

The data must not be changed as long as Busy is TRUE and the transmission is not completed.

Length

Length is the number of data bytes to be sent, and can be smaller than or equal to the size of the data structure being used. If the entire contents of a variable are to be sent, then the length can be determined using SIZEOF(send data).