TCP_Write (FB)¶
FUNCTION_BLOCK TCP_Write EXTENDS CBM.ETrigTo
This function block serves to write data to the previously established connection given in
hConnection. The content of the memory area indicated by pointer pData contains the data to be
written. szSize defines the number of bytes to be written. When xDone is set to TRUE the data was
written successfully.
The time out value has no effect at this function block.
- InOut:
Scope
Name
Type
Comment
Inherited from
Input
xExecuteBOOLRising edge: Action startsFalling edge: Resets outputsIf a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone,xError) are present at the outputs for exactly one cycle.ETrigTo
udiTimeOutUDINTDefines the time (µs) after which an FB (e.g. requiring an external acknowledgement) aborts operation due to a timeout with error message.
ETrigTo
Output
xDoneBOOLTRUE: Action successfully completedETrigTo
xBusyBOOLTRUE: Function block activeETrigTo
xErrorBOOLTRUE: Error occurred, function block aborts actionFALSE: No errorETrigTo
Input
hConnectionCAA.HANDLEszSizeCAA.SIZEpDataCAA.PVOIDOutput
eError