WARNING: This tool is not maintained anymore. The code is fine it could do the job, but I found out it is much safer and easier to maintain to use code instead of created xml using a GUI. With the latest version of opcua-asyncua you can easily write custom enums/structs using code like:
snode1, _ = await new_struct(server, idx, "MyStruct", [
new_struct_field("MyBool", ua.VariantType.Boolean),
new_struct_field("MyUInt32List", ua.VariantType.UInt32, array=True),
])
snode2, _ = await new_struct(server, idx, "MyOptionalStruct", [
new_struct_field("MyBool", ua.VariantType.Boolean),
new_struct_field("MyUInt32List", ua.VariantType.UInt32, array=True),
new_struct_field("MyInt64", ua.VariantType.Int64, optional=True),
])
enode = await new_enum(server, idx, "MyEnum", [
"titi",
"toto",
"tutu",
])
Free OPC UA Modeler is a tool for designing OPC UA address spaces. It uses OPC UA specified XML format which allows the produced XML to be imported into any OPC UA SDK.
Basic features of the modeler work, but this is a work in progress.
Bug reports and feature requests are welcome.
Ïn the background the modeler uses an OPC UA server which can be connected to. The server is either a python-opcua server (default) or the C based open65421 server. To use the open62541 backend, open65241.so must be available as well as the its python wrapper.
Current state and plans can be found here: #3
The process of creatig custom structures is a bit different than in order modelers. Ideas and code to improve process is welcome
- Create a new namespace (Only ONE namespace is required, namespace one will be used)
- create a new data type under DataType / Structure
- populate data type with new variables using correct data type
- save
The new nodes under your custom Structure will not be saved in model but a new node called TypeDictionnay will be created and its value describe the custom nodes (As specified in UA specification). When reopening your model, the design nodes will be recreated on the fly and you can add/modify your custom structure
Note: PyQT 5 is required.
Note: Python 3.6+ is required.
- Make sure python 3.6+ and python-pip is installed
pip3 install opcua-modeler
- Run with:
opcua-modeler
- Install winpython https://winpython.github.io/
- Use pip to install opcua-modeler:
pip install opcua-modeler
- Run via the script pip created:
YOUR_INSTALL_PATH\Python\Python35Python\Python35-32\Scripts\opcua-modeler.exe
To update to the latest release run: pip install opcua-modeler --upgrade
- git clone https://github.com/FreeOpcUa/python-opcua.git
- git clone https://github.com/FreeOpcUa/opcua-widgets.git
- export PYTHONPATH=$PWD/python-opcua;$PWD/opcua-widgets # let Python find the repositories or set PYTHONPATH=%PYTHONPATH%;%cd%\python-opcua;%cd%\opcua-widgets on Windows
- git clone https://github.com/FreeOpcUa/opcua-modeler.git
- cd opcua-modeler;
- 'python3 app.py' # or 'make run'