RdcyAcyclicFileTransfer (FUN)¶
FUNCTION RdcyAcyclicFileTransfer : RTS_IEC_RESULT
Synchronize a file synchronously in acyclic context (blocking).
This function has the following blocking (synchronous) behavior: It will block until any other previous call of this function has finished. It will block until the whole file is synchronized. It will interrupt when an error occurs in the underlying transmission.
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
RdcyAcyclicFileTransferRTS_IEC_RESULTError code (see CmpErrors.library). ERR_OK if the file was successfully synchronized, ERR_FAILED if some internal error in underlying functions occurred (see debug logger 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, or ERR_NO_ACCESS_RIGHTS if any of the two file names is not allowed to be accessed from IEC applications.
Input
pcszAcyclicDataUUIDREFERENCE TO STRING
IN: The same Data UUID, which was used for registration with the RdcyAcyclicRegisterUsage FUNCTION.
pcszLocalFileNameREFERENCE TO STRING
IN: Path to the local file to be synchronized to the other PLC. This can be a full file path or a path containing placeholders as defined in the ‘SysFile’ section.
pcszPeerFileNameREFERENCE TO STRING
IN: Path to the file on the partner PLC. This can be a full file path or a path with placeholders as defined in the ‘SysFile’ section. If NULL is provided, the same path as pcszLocalFileName is used.