Skip to content

first_steps

Christoph Lehr edited this page Nov 25, 2020 · 4 revisions

Firsts Steps

Creating new Models

When creating a new Model select the Architecture Context OPC UA/Informationmodel:

As the tool does not automatically generate any namespaces it's better to create the Diagrams itself later. When clicking on finish, it may take a minute until the new model is initialized and the namespace 0 elements are loaded.

Start Modelling

The first step which should be done is creating a namespace, this can be done by right clicking on the root element of your model in the Model Explorer. In the now opened context menu there is a entry NodeSet and in there is an entry Namespace.

After creating the namespace, the URI can be set inside the propoerties tab:

The next step is to create a NodeSet Diagram by right clicking on the created namespace element inside the Model Explorer. In the context menu click on New Diagram and then on NodeSetDiagram.

On the right side of the diagram the following palette is shown. It can be used to directly drag and drop new elements into the Diagram.

Each Element can be configured in the Profile page inside the properties page. That a configuration of an UANode (UAObjectType, UAMethod,...) is valid at least the browseName and the NodeID need to be set.

For creatign Rerferences between Elements click on the Reference entry in the palette and connect the desired diagram elements. In the Profile page inside the Properties Tab, the the direction of the Reference and the desired ReferenceType can selected. By clicking on the Button with the 3 dots all available ReferenceTypes can be browsed through, including namespace 0 and all imported Namespaces.

As the Namespace 0 is automatically loaded all elements from it can be used and draged from the Model Explorer into the diagram and used with References.

Non-Graphical Elements

Not all elements required for modelling are part of the Graphical notation, e.g. RolePermissions. These elements can be added via the Model Explorer, right click on an element of your model and select the desired item. Again the configuration options are in the Profile page inside the Properties tab. Afterwards the model member can be referenced in the element.

Displaying Configuration Entries

Per default no entry of the element is displayed in the diagram, to do this select the desired object in the diagram an open the Appearance page inside the Properties tab. Scroll to Stereotype display and check the top most entry in the In Comment collumn, afterwards deselect every entry which shall not be displayed.

Exporting the NodeSet

On every save of the model a NodeSet file will be generated in the backgraound and is stored in the project directoy. It has the same name as your model file, but with a xml file extension.

If you want to directly export your diagram to a dedicated location this can be done via Export menu of Papyrus. Right click on an Element of your model inside the Model Explorer, under Export select Export NodeSet Informationmodel.

An export to this location can also be done automatically via the preferences. Go to Window --> Preferences and select the OPC UA page. First configure the Default Export directory and then check "Automatically generate a NodeSet file on save inside the default export directory". If the project folder shall be taken over also check "Create folder hierarchy of NodeSet file inside default export folder".

Importing NodeSet

On every save a NodeSet file corresponding to the model is generated, this NodeSet file can also be used by other applications and will be loaded if it was changed.

For importing a NodeSet to use inside your model right click on an Element of your model inside the Model Explorer, under Import select Import NodeSet Model and select the corresponding UML file of the Informationmodel. If a NodeSet shall be imported and the loaded model shall be updated accordingliny use Update NodeSet instead.

Configuration Options

The preferences for the diagram can be found under Window --> Preferences and then select the OPC UA page. The default import and export directories are used as a starting point for the file browsers when e.g. exporting a NodeSet.

The default NodeId scheme can be selected to be either automatic type selection depending on the content of the NodeId field or always use the string scheme.

If other tools use the automatic generated NodeSet file but the changes shall not be synched back, uncheck "Automatically relaod NodeSet if underlaying NodeSet file is changed"

Console log output level can be changed depending on the desired verbosity, this is only relevant for tracing bugs or issues with the model.