RdcyAcyclicSend (FUN)¶
FUNCTION RdcyAcyclicSend : RTS_IEC_RESULT
Send acyclic data synchronous (blocking).
This function has the following blocking (synchronous) behavior: It will block until any other previous call of this function has finished or a timeout occurs. It will block until all of the bytes in the buffer are sent or a timeout occurs. It will block until the acknowledge of the internal acyclic network protocol has been received or a timeout occurs. The total timeout for these blocks is the [CmpRedundancy] setting “TcpWaitTime”.
Precondition: The acyclic data transfer module has to be in the RA_STATE_PROTOCOL_VER_SUCCEEDED RdcyAcyclicState. Hint: The current state of the acyclic data transfer module can be queried with the RdcyAcyclicGetCurState FUNCTION.
- InOut:
Scope
Name
Type
Comment
Return
RdcyAcyclicSendRTS_IEC_RESULTError code (see CmpErrors.library). ERR_FAILED if the RdcyConnectionSendData2() function failed or the RdcyAcyclicSendAsync() function failed (see log for details), ERR_NOTINITIALIZED if the acyclic data transfer module is not in the RA_STATE_PROTOCOL_VER_SUCCEEDED RdcyAcyclicState, ERR_PARAMETER if one of the parameters is invalid, ERR_NO_OBJECT if there is no usage with this data UUID registered, ERR_TIMEOUT if the acknowledge of the internal acyclic network protocol hasn’t been received, ERR_NOBUFFER if the maximum number of concurrent send jobs is exhausted at the moment, else ERR_OK
Input
pcszAcyclicDataUUIDREFERENCE TO STRING
The same Data UUID, which was used for registration with the RdcyAcyclicRegisterUsage FUNCTION.
pcBufferPOINTER TO BYTE
A pointer to the buffer containing the data to transmit
lengthDWORDThe length of the data pointed to by the pcBuffer parameter