RdcyAcyclicSend (FUN)¶
FUNCTION RdcyAcyclicSend : RTS_IEC_RESULT
Send acyclic data.
This function is protected by a semaphore. When a task uses RdcyAcyclicSend, it will be blocked for other tasks.
Currently RdcyAcyclicSend() has the blocking (synchronous) behavior described below. In future versions the behavior will be non-blocking (asynchronous). RdcyAcyclicSend() will block until any other previous call of this function has finished or a timeout occurs. RdcyAcyclicSend() will block until all of the bytes in the buffer are sent or a timeout occurs. RdcyAcyclicSend() 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 - RdcyAcyclicSend- RTS_IEC_RESULT- Error code (see CmpErrors.library). ERR_FAILED if the RdcyConnectionSendData2 function failed, ERR_NOT_READY_YET if the semaphore of this function could not be entered within the timeout because it is locked (currently another task is in a call of this function), 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_TIMEOUT if the acknowledge of the internal acyclic network protocol hasn’t been received, else ERR_OK - Input - pcszAcyclicDataUUID- REFERENCE TO STRING - The same Data UUID, which was used for registration with the RdcyAcyclicRegisterUsage FUNCTION. - pBuffer- POINTER TO BYTE - The pointer to the buffer containing the data to transmit - length- DWORD- The length of the data pointed to by the pBuffer parameter