05/12/2023
Hello,
I have a demo AppModel.xml which depends on Safety UA-NodeSet. I see the only files available in the safety nodes set link are pre generated Opc.Ua.Safety.NodeSet2.xml , Opc.Ua.Safety.NodeIds.csv and Opc.Ua.Safety.Types.xsd.
I want to understand how to use UA-Model compiler to compile and generate AppModel.Nodeset2.xml with the above dependency as the model compiler only takes xml as an argument. I am using the latest UA-Model compiler
Opc.Ua.ModelCompiler.exe compile -d2 AppModel.xml -d2 ("What to Put here") -cg AppModel.csv -o2 .\output_files
This is my AppModel.xml
<ModelDesign
xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:opcua="https://opcfoundation.org/UA/"
xmlns:safety="https://opcfoundation.org/UA/Safety/"
xmlns:Demo="urn:open62541.server.application"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TargetNamespace="urn:open62541.server.application"
TargetVersion="0.1.0"
TargetPublicationDate="2022-05-02T00:00:00Z"
xmlns="https://opcfoundation.org/UA/ModelDesign.xsd">
<Namespaces>
<Namespace Name="opcua" Prefix="opcua" Version="1.03" PublicationDate="2013-12-02T00:00:00Z">https://opcfoundation.org/UA/&l.....ce>
<Namespace Name="safety" Prefix="safety" PublicationDate="2022-06-28T00:00:00Z" Version="1.05.02">https://opcfoundation.org/UA/Sa.....ce>
<Namespace Name="Demo" Prefix="Demo">urn:open62541.server.application</Namespace>
</Namespaces>
<!-- ### Object ###-->
<Object SymbolicName="Demo:MySafetyObj" TypeDefinition="safety:SafetyProviderType">
</Object>
</ModelDesign>
05/30/2017
From the README:
Opc.Ua.ModelCompiler compile -d2 .\Opc.Ua.Machinery.NodeSet2.xml,Opc.Ua.Machinery,Machinery -d2 Opc.Ua.Di.NodeSet2.xml,Opc.Ua.DI,DI -version v105 -exclude Draft -o2 .\output
The target file is the first -d2.
If the file is a NodeSet it needs the prefix and model name appended to the file name since this information is not in the file.
1 Guest(s)