Asynchronous methods
The asynchronous methods of FB_MlSvrPrediction
are characterized in their signature by the fact that they accept a timeout parameter and return a bool indicating the execution state of the asynchronous request. The PLC program must therefore wait for the asynchronous methods to finish executing and configure the timeout according to the requirements of the application so that the application can respond appropriately to any delays in the TcMlServer. Note that the specified timeout is given in the unit PLC task cycles.
It is also important to note that the processing of the asynchronous request can of course only be monitored with the temporal granularity of the PLC task cycle time. It is therefore important that applications with a low delay budget have the lowest possible cycle times and correspondingly high sampling rates in order to minimize delays caused by time resolution. This is particularly important when interacting with other, computationally intensive and synchronously executed algorithms, e.g. when pre- or post-processing data.
However, a restriction regarding the minimum PLC task cycle time is imposed by the amount of data that has to be transported from the client to the server. When transferring large amounts of data, such as large image data, the PLC task cycle time must be configured to prevent cycle timeouts.