Workflow
The workflow consists of the following steps:
- Extract PLC interface description from the ONNX file (with the TwinCAT Machine Learning Model Manager).
- A PlcOpenXml is created from the ONNX file, which provides the input and output data type of the model for the PLC.
- A JSON file is generated which contains metadata about the model. Metadata is TwinCAT-specific on the one hand and application-specific from the user on the other.
- Provide JSON file and ONNX file on the target system.
- Import PlcOpenXml in TwinCAT Engineering and incorporate it into the PLC program using FB_MlSvrPrediction.
- Configure the TwinCAT Machine Learning Server from the PLC and load the AI model.
- Call the loaded AI model asynchronously to the PLC task cycle.
- Exchange/update an AI model at runtime of the machine.