Closed ancapaul closed 5 months ago
The dependent model CSV must have the same name and be in the same folder as the xml.
The MachineFrameworkIdentfiers.csv cannot be passed on the command line when building Fridge.xml
You also have the option of using MachineFramework.NodeSet2.xml instead of MachineFramework.xml
Hello,
Thanks for your response. I tried both your suggestions but it still doesn't work. The node id simply changed to "ns=1;i=1" for all types that refer to the MachineFramework.xml types.
Try ordering your dependencies starting with the target schema at top with the UA schema at the bottom.
Confirm your CSV has the correct IDs in it.
When I run it on my machine it works.
I tried building using the following:
SET PATH=%PATH%;.\UA-ModelCompiler\build\bin\Release\net8.0\;
Opc.Ua.ModelCompiler.exe compile^
-d2 .\MachineFramework.xml^
-cg MachineFramework.csv^
-version v105 -o2 .\MachineFrameworkOutput\
Opc.Ua.ModelCompiler.exe compile^
-d2 .\Fridge.xml^
-d2 .\MachineFrameworkOutput\MachineFramework.NodeSet2.xml^
-cg Fridge.csv^
-version v105 -o2 .\FridgeOutput\
pause
and
SET PATH=%PATH%;.\UA-ModelCompiler\build\bin\Release\net8.0\;
Opc.Ua.ModelCompiler.exe compile^
-d2 .\MachineFramework.xml^
-cg MachineFramework.csv^
-version v105 -o2 .\MachineFrameworkOutput\
Opc.Ua.ModelCompiler.exe compile^
-d2 .\Fridge.xml^
-d2 .\MachineFramework.xml^
-cg Fridge.csv^
-version v105 -o2 .\FridgeOutput\
pause
Sorry. Yes it appears to be working but the node ID's in Fridge NodeSet file don't seem to match what is in the MachineFramework NodeSet file.
It appears that the "ns" part of the node id is wrong. In the Fridge NodeSet file it is "ns=2;i=23" and in the MachineFramework NodeSet file it is "ns=1;i=23"
That is not wrong. The indexes are references to the URIs in the NamespaceUris array at the top of the NodeSet.
Thank you.
Hello,
When I compile multiple XML informational models where one of the informational models relies on the other. The resulting node set file contains node id references to the other informational model that are incorrect. All the node id references to the other informational model are “ns=2;i=0”
This is the informational model that contains all the types:
This is the informational model that relies on types defined in the above informational model:
The above two informational models are compiled using the following two commands:
Opc.Ua.ModelCompiler.exe compile^ -d2 .\MachineFramework.xml^ -cg MachineFrameworkIdentfiers.csv^ -version v105 -o2 .\MachineFrameworkOutput\
Opc.Ua.ModelCompiler.exe compile^ -d2 .\Fridge.xml^ -d2 .\MachineFramework.xml^ -cg FridgeIdentfiers.csv^ -version v105 -o2 .\FridgeOutput\
The resulting node set file for the fridge model has “ns=2;i=0” for all types that reference the machine framework informational model:
Can you please tell me what I'm doing wrong.
Thank you.