Replies: 5 comments
-
typically you need to import the spec. xml and then you can instantiate the obejcttypes according to the spec. |
Beta Was this translation helpful? Give feedback.
-
what errors did you got? |
Beta Was this translation helpful? Give feedback.
-
Yes importing the XML is the way to go. And if the importer has bugs then you would help everyone by fixing them. |
Beta Was this translation helpful? Give feedback.
-
I had taken a look on the specs xml and it hasn't got any other xml requirements to be imported first (only the basic itself, but this is done anyway). Like Andreas said, you can take a look on the umati example or this one from us (just import the stuff after Since I touched the importer the last time, it is of course perfect and no errors ever happened(*turn sarcasm off*). ;^)
Please provide the log of the error you have. Either here or even better as an separate issue. Also keep in mind, that UAMethods have to be linked with a Python function, before usage (otherwise they are empty/faulty). |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick replies! The umati server implementation looks interesting and might be a good starting point. I'll have a look. @swamper123 Of course I assumed impeccable functioning of the importer. That's why I asked what I might be doing wrong. ;-) For testing I used the The Issue: #651 |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm planing to implement a companion specification and wonder what would be the right way to do it using asyncua? Specifically I want to implement the MachineVision specification (
schemas/UA-Nodeset-master/MachineVision/Opc.Ua.MachineVision.NodeSet2.xml
).At the moment I see 3 ways to approach this:
1.) Hardcode it by hand. Works, but it's tedious, error-prone and more work when the specification gets updated.
2.) Import the XML specs and add the logic in Python. Would be my path of choice, but xml file appears to contain datastructures the xml-importer can't handle. If "this is the way" I might be able to have a deeper look to debbug the cause.
3.) Autogenerate the code. Maybe it's possible to use the
generate_*
scripts in the/schemas/
directory to generate the code from the .xml definition?Regards
Beta Was this translation helpful? Give feedback.
All reactions