Configure()
Calling the method configure instantiates a session for the respective instance of the function block FB_MlSvrPrediction
in the TcMlServer. The configuration defined in the FB member stPredictionParameter
is used for instantiation.
The instantiation of a session can take a considerable amount of time, in particular because several inferences are made to temper the inference engine (model warm-up). This fact should be taken into account when selecting the timeout parameter of the method call.
It should also be taken into account that calling the method when configuring a CUDA accelerated session temporarily requires exclusive access to the GPU. The configuration of such a session can therefore interfere considerably with the inference performance of other FBs operating in parallel.
After the method indicates the completion of the processing of the asynchronous instantiation call by returning TRUE, the result can be evaluated via the FB members bError and, in the event of an error, nErrorCode. Once an inference session has been successfully instantiated, the FB will set the member bConfigured
to TRUE.
See also Configuring the server from the PLC client.
| Parameter | Type | Default | Description |
---|---|---|---|---|
INPUT | nTimeout | ULINT |
| Number of PLC task cycles before the timeout error is returned. |
INPUT | nPriority | UDINT | 0 | Priority of the request. Bigger means higher priority. |
OUTPUT | Configure | BOOL |
| Return value. TRUE as soon as the result of the asynchronous call is available. The result of the call can then be checked using the 'bError' and 'nErrorCode' properties. |