Hello,
I'm using the opcua-asyncio
client to write around 30 tags in a single request to the Ignition server using Client.write_values
. This however turns out to be rather slow and takes around 300ms/tag (or 9 seconds for 30 tags).
At the same time writing these same tags from inside Ignition is fast, and takes 200ms (no mater the number of tags).
Could someone confirm that is expected that one should be able to write tags to Ignition in batches fast when using a Python client? Maybe there is some setting in Ignition that could explain this situation? Thank you!
What kinds of tags are you writing to? What method are you using to time and write from inside Ignition?
I'm writing to tags of type Double. Sorry I don't know much about Ignition, please let me know if that's not the information you asked about.
For writing tags inside Ignition we are using system.tag.writeBlocking
and this works well, the problem is when writing those tags via a Python client.
Where do the tags come from though? Are they device tags? From the same device or from multiple? Or just memory tags from some tag provider?
Imagine you had to explain this to support in enough detail that they can try to reproduce it (because you probably will have to do that).
1 Like
Hello,
I am working together with Roman_Yurchak.
My colleague is trying to write into ignition OPC tags from an external program using the python opcua client(outside of ignition).
The opcua server that exposes the tags my colleague is trying to write into is the default Ignition OPCUA Server of an ignition application. The ignition gateway that hosts this ignition application is connected to those devices (so there are multiple devices) using different protocols.
We noticed that writing into this tags using
system.tag.writeBlocking(tagPaths,values)
was quite fast.
However, using an external program to write into the same opc tags takes much more time as if we executing them sequentially from the (client side) script console like:
for tagpath,value in zip(tagPaths,values):
system.tag.writeBlocking([tagpath],value)
Bests
I'd use wireshark to determine if the python client is actually submitting the writes as a batch.
1 Like
Normally yes, it does make a single request with all the tags to write, which is constructed here and here in the asyncua Python library.
Yes, but if you can share a Wireshark capture we can verify that and perhaps more importantly get a look at the tag paths and possibly infer some information about what kinds of tags/devices you are writing to, since you've side stepped actually answering in any detail.
2 Likes
Thanks for your response and feedback! OK, we'll try to investigate more next week and I'll try to do the wireshark recording.
Essentially I asked the initial question, in case it was either an expected behavior or a known issue. Since I haven't seen anyone else complaining about it (in this space or on Github), it looks like it's neither. Probably indeed something specific to our setup. We can't really share too much specific information in a public forum (I'm not evading your questions
) but this discussion has already been very useful, thanks. I'll investigate more next week.
It might be a more direct and interesting comparison to do a bulk system.opc.writeValues
in Ignition and compare that instead. In theory this should actually be faster than going through the tag system, and it more directly maps to what you're doing with the external client.
2 Likes
Try with another tool like UA Expert Performance View. Ignition OPC UA Server always perform really really good.
1 Like