04/08/2025
Offlinehi all,
Iam trying to use model compiler in order to generate nodeset2.xml for my own namespace created at DemoModel.xml , this Model is using UAFX automation component which is defined in Opc.Ua.FX.AC.NodeSet2.xml (download from UA-Nodeset/UAFX at latest · OPCFoundation/UA-Nodeset · GitHub)
my DemoModel.xml looks like this:
<opc:ModelDesign
xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ua="https://opcfoundation.org/UA/"
xmlns:di="https://opcfoundation.org/UA/DI/"
xmlns:opc="https://opcfoundation.org/UA/ModelDesign.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:UAFX="https://opcfoundation.org/UA/FX/AC/"
xmlns:IND="https://opcua.rocks/UA/ind/"
xmlns="https://opcua.rocks/UA/ind/"
TargetNamespace="https://opcua.rocks/UA/ind/"
TargetXmlNamespace="https://opcua.rocks/UA/ind/"
TargetVersion="1.05.03"
TargetPublicationDate="2023-12-15T00:00:00Z">
<opc:RequiredModel>
<opc:Model ModelUri="https://opcfoundation.org/UA/FX/Data/" Version="1.00.02" PublicationDate="2024-02-02T00:00:00Z" />
<opc:Model ModelUri="https://opcfoundation.org/UA/FX/CM/" Version="1.00.02" PublicationDate="2024-02-02T00:00:00Z" />
<opc:Model ModelUri="https://opcfoundation.org/UA/FX/AC/" Version="1.00.02" PublicationDate="2024-02-02T00:00:00Z" />
</opc:RequiredModel>
<opc:Namespaces>
<opc:Namespace Name="UAFX" XMLNamespace="https://opcfoundation.org/UA/FX/AC/">https://opcfoundation.org/UA/FX.....ce>
<opc:Namespace Name="ind" Prefix="ind" XmlNamespace="https://opcua.rocks/UA/ind/Types.xsd" XmlPrefix="ind">https://opcua.rocks/UA/ind/<.....ce>
<opc:Namespace Name="OpcUa" Prefix="Opc.Ua" Version="1.05.02" PublicationDate="2022-06-28T00:00:00Z" InternalPrefix="Opc.Ua.Server" XmlNamespace="https://opcfoundation.org/UA/2008/02/Types.xsd" XmlPrefix="OpcUa">https://opcfoundation.org/UA/&l.....ce>
<opc:Namespace Name="DI" Prefix="Opc.Ua.Di" InternalPrefix="Opc.Ua.Di.Server" XmlPrefix="OpcUaDi">https://opcfoundation.org/UA/DI.....ce>
</opc:Namespaces>
<opc:ObjectType SymbolicName="IND:GenericTemperatureSensorType" BaseType="ua:BaseObjectType">
<opc:Description>A generic Temperature Sensor</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Temp_Measurement" DataType="ua:Double" />
<opc:Variable SymbolicName="IND:Temp_Unit" DataType="ua:String" />
<opc:Method SymbolicName="IND:Reset_Temp" ModellingRule="Mandatory">
<opc:OutputArguments>
<opc:Argument Name="IND:Reset_Temp_Success" DataType="ua:Boolean">
<opc:Description>Reset temperature Successfully</opc:Description>
</opc:Argument>
</opc:OutputArguments>
</opc:Method>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:GenericHeaterType" BaseType="ua:BaseObjectType">
<opc:Description>A generic sensor for Heater</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Status" DataType="ua:Boolean" ModellingRule="Mandatory">
</opc:Variable>
<opc:Method SymbolicName="IND:TurnOn_Heater" ModellingRule="Mandatory" />
<opc:Method SymbolicName="IND:TurnOff_Heater" ModellingRule="Mandatory" />
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:ProximitySensorType" BaseType="ua:BaseObjectType">
<opc:Description>A generic Proximity sensor</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Proximity" DataType="ua:Double" ModellingRule="Mandatory">
</opc:Variable>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:RoboticArmType" BaseType="ua:BaseObjectType">
<opc:Description>A Robotic Arm</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Position" DataType="ua:String" ModellingRule="Mandatory">
</opc:Variable>
<opc:Method SymbolicName="IND:Reset_Position" ModellingRule="Mandatory">
<opc:InputArguments>
<opc:Argument Name="IND:TargetPosition" DataType="ua:String">
<opc:Description>How frequently to scan values when calibrating.</opc:Description>
</opc:Argument>
</opc:InputArguments>
<opc:OutputArguments>
<opc:Argument Name="IND:Success_Movement" DataType="ua:Boolean">
<opc:Description>Robotic Arm Moved Successfully</opc:Description>
</opc:Argument>
</opc:OutputArguments>
</opc:Method>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:MyFunctionalEntity" BaseType="UAFX:FunctionalEntityType">
<opc:Children>
<opc:Object SymbolicName="IND:TempSensor" TypeDefinition="IND:GenericTemperatureSensorType"/>
<opc:Object SymbolicName="IND:Heater" TypeDefinition="IND:GenericHeaterType"/>
<opc:Object SymbolicName="IND:Proximity" TypeDefinition="IND:ProximitySensorType"/>
<opc:Object SymbolicName="IND:Arm" TypeDefinition="IND:RoboticArmType"/>
</opc:Children>
</opc:ObjectType>
</opc:ModelDesign>
Command to compile:
dotnet Opc.Ua.ModelCompiler.dll compile -d2 DemoModel.xml -d2 /home/nxf75119/tmp/UA-ModelCompiler/Schemas/Opc.Ua.FX.AC.NodeSet2.xml,UAFX -d2 -cg temp.csv -o2 Demo
Issue:
[InvalidDataException] Could not find DataType Node for Field '1:PublisherQosDataType/DatagramQos/TransmitQosDataType'.
As per my understanding:
TransmitQosDataType is defined in Opc.Ua.Nodeset2.xml (core base file) , which compiler should be knowing already , so iam not getting were iam going wrong , can anyone help pls.
05/30/2017
OfflineAll namespace URIs start with HTTP not HTTPS.
The target model appears first in the Namespace list.
Add all referenced NodeSets on the command line:
-d2
"nodesets\public\UAFX\opc.ua.fx.ac.nodeset2.xml,Opc.UAFX.AC,Opc.UAFX.AC"
-d2
"nodesets\public\UAFX\opc.ua.fx.cm.nodeset2.xml,Opc.UAFX.CM,Opc.UAFX.CM"
-d2
"nodesets\public\UAFX\opc.ua.fx.data.nodeset2.xml,Opc.UAFX.Data,Opc.UAFX.Data"
-d2
"nodesets\public\DI\Opc.Ua.Di.NodeSet2.xml,Opc.Ua.Di,Opc.Ua.Di"
04/08/2025
OfflineRandy Armstrong said
All namespace URIs start with HTTP not HTTPS.The target model appears first in the Namespace list.
Add all referenced NodeSets on the command line:
-d2
@"nodesets\public\UAFX\opc.ua.fx.ac.nodeset2.xml,Opc.UAFX.AC,Opc.UAFX.AC"
-d2
@"nodesets\public\UAFX\opc.ua.fx.cm.nodeset2.xml,Opc.UAFX.CM,Opc.UAFX.CM"
-d2
@"nodesets\public\UAFX\opc.ua.fx.data.nodeset2.xml,Opc.UAFX.Data,Opc.UAFX.Data"
-d2
@"nodesets\public\DI\Opc.Ua.Di.NodeSet2.xml,Opc.Ua.Di,Opc.Ua.Di"
hi Randy,
did the required changes in my DemoModel.xml
<opc:ModelDesign
xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ua="https://opcfoundation.org/UA/"
xmlns:di="https://opcfoundation.org/UA/DI/"
xmlns:opc="https://opcfoundation.org/UA/ModelDesign.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:UAFX="https://opcfoundation.org/UA/FX/AC/"
xmlns:IND="http://opcua.rocks/UA/ind/"
xmlns="http://opcua.rocks/UA/ind/"
TargetNamespace="http://opcua.rocks/UA/ind/"
TargetXmlNamespace="http://opcua.rocks/UA/ind/"
TargetVersion="1.05.03"
TargetPublicationDate="2023-12-15T00:00:00Z">
<opc:RequiredModel>
<opc:Model ModelUri="https://opcfoundation.org/UA/FX/Data/" Version="1.00.02" PublicationDate="2024-02-02T00:00:00Z" />
<opc:Model ModelUri="https://opcfoundation.org/UA/FX/CM/" Version="1.00.02" PublicationDate="2024-02-02T00:00:00Z" />
<opc:Model ModelUri="https://opcfoundation.org/UA/FX/AC/" Version="1.00.02" PublicationDate="2024-02-02T00:00:00Z" />
</opc:RequiredModel>
<opc:Namespaces>
<opc:Namespace Name="UAFX" XMLNamespace="https://opcfoundation.org/UA/FX/AC/">https://opcfoundation.org/UA/FX.....ce>
<opc:Namespace Name="ind" Prefix="ind" XmlNamespace="http://opcua.rocks/UA/ind/Types.xsd" XmlPrefix="ind">http://opcua.rocks/UA/ind/<.....ce>
<!-- <opc:Namespace Name="DemoModel" Prefix="DemoModel" XmlNamespace="urn:opcfoundation.org:2024-01:DemoModelTypes.xsd" XmlPrefix="DemoModel">urn:opcfoundation.org:2024-01:DemoModel</opc:Namespace> -->
<opc:Namespace Name="OpcUa" Prefix="Opc.Ua" Version="1.05.02" PublicationDate="2022-06-28T00:00:00Z" InternalPrefix="Opc.Ua.Server" XmlNamespace="https://opcfoundation.org/UA/2008/02/Types.xsd" XmlPrefix="OpcUa">https://opcfoundation.org/UA/&l.....ce>
<opc:Namespace Name="DI" Prefix="Opc.Ua.Di" InternalPrefix="Opc.Ua.Di.Server" XmlPrefix="OpcUaDi">https://opcfoundation.org/UA/DI.....ce>
</opc:Namespaces>
<!-- Few Intializations wrt to my Model -->
<opc:ObjectType SymbolicName="IND:MyFunctionalEntity" BaseType="UAFX:FunctionalEntityType">
<opc:Children>
<opc:Object SymbolicName="IND:TempSensor" TypeDefinition="IND:GenericTemperatureSensorType"/>
<opc:Object SymbolicName="IND:Heater" TypeDefinition="IND:GenericHeaterType"/>
<opc:Object SymbolicName="IND:Proximity" TypeDefinition="IND:ProximitySensorType"/>
<opc:Object SymbolicName="IND:Arm" TypeDefinition="IND:RoboticArmType"/>
</opc:Children>
</opc:ObjectType>
Command use to compile:
dotnet Opc.Ua.ModelCompiler.dll compile
-d2 DemoModel.xml
-d2 /home/nxf75119/tmp/UA-ModelCompiler/Schemas/opc.ua.fx.ac.nodeset2.xml,Opc.UAFX.AC,Opc.UAFX.AC
-d2 /home/nxf75119/tmp/UA-ModelCompiler/Schemas/opc.ua.fx.cm.nodeset2.xml,Opc.UAFX.CM,Opc.UAFX.CM
-d2 /home/nxf75119/tmp/UA-ModelCompiler/Schemas/opc.ua.fx.data.nodeset2.xml
-d2 /home/nxf75119/tmp/UA-Nodeset/DI/Opc.Ua.Di.NodeSet2.xml,Opc.Ua.Di,Opc.Ua.Di
-cg temp.csv
-o2 Demo
Still getting issue as below:
[InvalidDataException] Could not find DataType Node for Field '1:PubSubCommunicationConfigurationDataType/PubSubConfiguration/PubSubConfiguration2DataType'.
Can pls help me understanding where am i going wrong with whole process.
Regards,
Rahil
05/30/2017
OfflineThis works for me:
```
compile
-version
v105
-d2
"DemoModel.xml"
-d2
"nodesets\public\UAFX\opc.ua.fx.ac.nodeset2.xml,Opc.UAFX.AC,Opc.UAFX.AC"
-d2
"nodesets\public\UAFX\opc.ua.fx.cm.nodeset2.xml,Opc.UAFX.CM,Opc.UAFX.CM"
-d2
"nodesets\public\UAFX\opc.ua.fx.data.nodeset2.xml,Opc.UAFX.Data,Opc.UAFX.Data"
-d2
"nodesets\public\DI\Opc.Ua.Di.NodeSet2.xml,Opc.Ua.Di,Opc.Ua.Di"
-cg
"DemoModel.csv"
-o2
"DemoModel\Models\"
```
```
<?xml version="1.0" encoding="utf-8"?>
<opc:ModelDesign
xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ua="https://opcfoundation.org/UA/"
xmlns:di="https://opcfoundation.org/UA/DI/"
xmlns:opc="https://opcfoundation.org/UA/ModelDesign.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:UAFX="https://opcfoundation.org/UA/FX/AC/"
xmlns:IND="http://opcua.rocks/UA/ind/"
xmlns="http://opcua.rocks/UA/ind/"
TargetNamespace="http://opcua.rocks/UA/ind/"
TargetXmlNamespace="http://opcua.rocks/UA/ind/"
TargetVersion="1.05.03"
TargetPublicationDate="2023-12-15T00:00:00Z">
<opc:Namespaces>
<opc:Namespace Name="ind" Prefix="ind" XmlNamespace="http://opcua.rocks/UA/ind/Types.xsd" XmlPrefix="ind">http://opcua.rocks/UA/ind/<.....ce>
<opc:Namespace Name="UAFX" XMLNamespace="https://opcfoundation.org/UA/FX/AC/">https://opcfoundation.org/UA/FX.....ce>
<opc:Namespace Name="DI" Prefix="Opc.Ua.Di" InternalPrefix="Opc.Ua.Di.Server" XmlPrefix="OpcUaDi">https://opcfoundation.org/UA/DI.....ce>
<opc:Namespace Name="OpcUa" Prefix="Opc.Ua" Version="1.05.02" PublicationDate="2022-06-28T00:00:00Z" InternalPrefix="Opc.Ua.Server" XmlNamespace="https://opcfoundation.org/UA/2008/02/Types.xsd" XmlPrefix="OpcUa">https://opcfoundation.org/UA/&l.....ce>
</opc:Namespaces>
<opc:ObjectType SymbolicName="IND:GenericTemperatureSensorType" BaseType="ua:BaseObjectType">
<opc:Description>A generic Temperature Sensor</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Temp_Measurement" DataType="ua:Double" />
<opc:Variable SymbolicName="IND:Temp_Unit" DataType="ua:String" />
<opc:Method SymbolicName="IND:Reset_Temp" ModellingRule="Mandatory">
<opc:OutputArguments>
<opc:Argument Name="IND:Reset_Temp_Success" DataType="ua:Boolean">
<opc:Description>Reset temperature Successfully</opc:Description>
</opc:Argument>
</opc:OutputArguments>
</opc:Method>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:GenericHeaterType" BaseType="ua:BaseObjectType">
<opc:Description>A generic sensor for Heater</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Status" DataType="ua:Boolean" ModellingRule="Mandatory">
</opc:Variable>
<opc:Method SymbolicName="IND:TurnOn_Heater" ModellingRule="Mandatory" />
<opc:Method SymbolicName="IND:TurnOff_Heater" ModellingRule="Mandatory" />
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:ProximitySensorType" BaseType="ua:BaseObjectType">
<opc:Description>A generic Proximity sensor</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Proximity" DataType="ua:Double" ModellingRule="Mandatory">
</opc:Variable>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:RoboticArmType" BaseType="ua:BaseObjectType">
<opc:Description>A Robotic Arm</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IND:Position" DataType="ua:String" ModellingRule="Mandatory">
</opc:Variable>
<opc:Method SymbolicName="IND:Reset_Position" ModellingRule="Mandatory">
<opc:InputArguments>
<opc:Argument Name="IND:TargetPosition" DataType="ua:String">
<opc:Description>How frequently to scan values when calibrating.</opc:Description>
</opc:Argument>
</opc:InputArguments>
<opc:OutputArguments>
<opc:Argument Name="IND:Success_Movement" DataType="ua:Boolean">
<opc:Description>Robotic Arm Moved Successfully</opc:Description>
</opc:Argument>
</opc:OutputArguments>
</opc:Method>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="IND:MyFunctionalEntity" BaseType="UAFX:FunctionalEntityType">
<opc:Children>
<opc:Object SymbolicName="IND:TempSensor" TypeDefinition="IND:GenericTemperatureSensorType"/>
<opc:Object SymbolicName="IND:Heater" TypeDefinition="IND:GenericHeaterType"/>
<opc:Object SymbolicName="IND:Proximity" TypeDefinition="IND:ProximitySensorType"/>
<opc:Object SymbolicName="IND:Arm" TypeDefinition="IND:RoboticArmType"/>
</opc:Children>
</opc:ObjectType>
</opc:ModelDesign>
```
1 Guest(s)


Log In

Usage Policy