XML Nodeset Compiler, any tips please.

299 views
Skip to first unread message

Alex Levit

unread,
Dec 8, 2020, 8:03:54 AM12/8/20
to open62541
Hi ,

We have had successful pilot using open62541 for custom client connecting to KepserverX. Now trying to bring up custom OPCUA server, looking for quick start I came to the need to build information model. Would be happy for some tips from you, please.

My problem started with that I can't reach the URL :

although it was referred here:
as "more detailed tutorial for this subject"

Q1 Have anybody here ever used XML Nodeset Compiler? Trying with existing documentation failing when compiling the model XML generated by opcua-modeler from here https://github.com/FreeOpcUa/opcua-modeler. Any tips for alternative tools or additional tutorials? 

Q2 Are there any tips you can suggest for alternative methods to build OPCUA server based on  open62541 with customized model?

Thanks a lot,
Alex  

Twoshrubs

unread,
Dec 8, 2020, 8:52:33 AM12/8/20
to open62541
Hello Alex,

I haven't used it for about 12months now, but it works a treat with no issues.
Lol, the manual is quite.. erm, makes you go 'eek',   but if you have your XML ready to go.. just copy the example command line and change a few names. That worked for me.

Shrubs

Alex Levit

unread,
Dec 9, 2020, 2:58:55 AM12/9/20
to open62541
Hi Shrubs,
Thanks for the answer, really appreciate it.
Can I ask you (as well as everyone here), how you create your XML? 
Is that a GUI tool or writing by hand?

Thanks again & Regards,
Alex

Twoshrubs

unread,
Dec 9, 2020, 4:52:01 AM12/9/20
to open62541
Hello Alex,

Sorry, I didn't create mine as I'm using one of the OPC Foundations companion specifications XML's
There is GUI tools around but have never used one.

Kind regards,

Shrubs

Ste Fan

unread,
Dec 9, 2020, 8:29:24 AM12/9/20
to open62541
Hello Alex,

I was in the same situation some month before.
I've recognized, that in older version of open62541 there is more information concerning the phyton scripts.

I made good experience using SiOME (Siemens OPC Modeling Editor). It is a graphical modelling tool and it is free after registration.
I used the nodeset XML from SiOME and generated code with nodeset compiler.

It works very well as soon you do not need to generate custom datatypes.
I needed custom data types and so I moved to UaModeler. 

Best regards 
Stefan

Alex Levit

unread,
Dec 9, 2020, 8:42:56 AM12/9/20
to open62541
Great to hear from you, Stefan and Shrubs!

Unfortunately I can't even compile the example provided with the open62541 itself ... 
Seems I am missing something basic otherwise it can be a real issue in the latest repo.
If  you can take a look at the issue I have just submitted you can help me further a lot:


I just keep failing the compilation with the output:

python ./nodeset_compiler.py --types-array=UA_TYPES --existing ../../tools/schema/Opc.Ua.NodeSet2.PubSubMinimal.xml --xml ../../examples/nodeset/myNS.xml myNS
INFO:main:Preprocessing (existing) ../../tools/schema/Opc.Ua.NodeSet2.PubSubMinimal.xml
Traceback (most recent call last):
File "./nodeset_compiler.py", line 123, in
ns.addNodeSet(xmlfile, True, typesArray=getTypesArray(nsCount))
File "/home/alex/workspaces/open62541/tools/nodeset_compiler/nodeset.py", line 296, in addNodeSet
node.replaceNamespaces(namespaceMapping)
File "/home/alex/workspaces/open62541/tools/nodeset_compiler/nodes.py", line 184, in replaceNamespaces
ref.referenceType.ns = nsMapping[ref.referenceType.ns]
AttributeError: 'unicode' object has no attribute 'ns'

Thanks again and best regards,
Alex

Ste Fan

unread,
Dec 9, 2020, 9:04:37 AM12/9/20
to open62541
You work with PubSub? Or why do you use  Opc.Ua.NodeSet2.PubSubMinimal.xml?
Never tried this. 
I use this line and every thing works fine :-)

python ../open62541_tools/nodeset_compiler/nodeset_compiler.py --types-array=UA_TYPES --existing ../open62541_tools/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml --xml mymodel.xml  mymodel

Alex Levit

unread,
Dec 9, 2020, 10:10:51 AM12/9/20
to open62541
Hi Stefan,

I can't find Opc.Ua.NodeSet2.xml in recent repo, so may be here may be the point... 
Specified it in the issue as well...
Can you send me your xml files so I can test with them just to clear out this  ?

Thanks
Alex

Götz Görisch

unread,
Dec 9, 2020, 10:38:03 AM12/9/20
to open62541
Hi Alex,


Best regards,
Götz

Alex Levit

unread,
Dec 9, 2020, 10:49:50 AM12/9/20
to open62541
Yes! Now it worked:) 
Thanks, Götz

Reply all
Reply to author
Forward
0 new messages