I have multiple machines/types of machines. The overall structure of my OPC UA model is the same for all machine types, but the machines differ in some places.
For example all programs of all machine types are subtypes of the 0:Structure, but the programs of the different machines differ from machine type to machine type.
Now I want to define some methods, which implement the same functionality for all machine types. These functions also should be include the programs of the machines.
e.g.:
Code: Select all
Signature:
DemoMethod(
[in] Int32 SomeValue,
[in] String SomeOtherValue,
[out] <ProgramType> Program
);
I tried different things to get it to work with UaModeler.
1. Create an ObjectType and set the Program Argument of the Method to the abstract DataType 0:Structure and select the specific subtype of the structure later.
-> Did not work. I couldn't change the data type later on. E.g. when creating the instance of the ObjectType.
2. Define the method in an ObjectType and create an subtype of the object and overwrite the function.
When I used the ModelingRule Optional or Mandatory I could not change the DataType of the Arguments later on.
When I used the ModelingRule OptionalPlaceholder or MandatoryPlaceholder I could not even select to overwrite these methods.
For me it seams, that the way to go is by using the OptionalPlaceholder or MandatoryPlaceholder (depending, if it should be Optional or Mandatory later).
This should be the preferred way, because it is mentioned in the OPC UA reference documentation:
https://reference.opcfoundation.org/Core/Part3/v104/docs/6.4.4.5.5For Methods, the ModellingRule OptionalPlaceholder is used to define the BrowseName where subtypes and instances provide more information. The Method definition with the OptionalPlaceholder only defines the BrowseName. An instance or subtype defines the InputArguments and OutputArguments. A subtype shall also change the ModellingRule to Optional or Mandatory.
What would be the correct/best way to model my methods with the UaModeler?
Thanks in advance and best regards
wrn