This error means that the current I/O data could not be passed to the firmware.
I/O Data transfer to the firmware/device is initiated by so-called handshake flags that synchronize the access to the data areas. There are several access rules, when the host is allowed to access the I/O areas. A firmware needs some time to copy the data from the dual-port memory to the internal buffers and during this time the area is locked for the host.
In this state the driver has the possibility to wait, if a timeout is passed to the function, for the area being released by the firmware. If no timeout is passed the error CIFX_DEV_EXCHANGE_FAILED is returned.
The most common causes are:
- Delay between two consecutive calls to xChannelIORead/xChannelIOWrite with timeout=0 is too short for the fieldbus device to copy the data from the DPM
- Wrong usage of PLC functions (e.g. Calling xChannelPLCActivateRead while xChannelPLCIsReadReady returns false)
- If a timeout is passed and the cifX Toolkit is used, it might be an error in the implementation of OS_GetMillisecondCounter() as this results in a wait time that is too short