How to use an information-model¶
In this tutorial you will learn how to extend the opcuaapp with an information-model of your choice. Before we begin, you should have created an APPIO project. For testing the results of this tutorial a opc ua front end client like UA Expert by Unified Automation is needed.
Import the information-model¶
Get the information-model of your choice and place it your APPIO project folder. You can also use the example information-model ‘DiNodeset’.
Execute APPIO import.
#custom information-model
appio import information-model -n appiotutorial -p myNS.xml -t DiTypes.bsd
#or the sample
appio import information-model -n appiotutorial -s
The information-model is now ready for generating.
Generate the opcuaapp¶
Next step: generating. You have to choose the Informationmodel.
appio generate information-model -n appiotutorial
APPIO uses the information-model parser from the open62541 stack to import the Informationmodel.
The opcuaapp with the name 'appiotutorial' was succesfully updated with the Information model 'myNS.xml'.
Build and deploy¶
Now it is time to build and publish the opcuaapp.
Execute:
appio build -n appiotutorial && \
appio publish -n appiotutorial
Result:
Build 'appiotutorial' success!
publish 'appiotutorial' success!
Starting the OPC UA server¶
To start the OPC UA server generated by APPIO, execute:
cd appiotutorial/publish/ && \
./server-app
You can read your information-model with the frontend OPC UA client.