Read bulk tags from one PLC & write to another PLC. SLOWWW!

[quote=“pratul”]Hello Kevin,

I am seeing that my python script which just directly writes to the PLC takes a significant amount of time if I write just 2 words(tags) or 1024 words(tags).

tagpaths = ["[c_plc]A1", "[c_plc]A1021"] values = [1, 1] system.opc.writeValues(server,tagpaths,values)

Of course in the case of writing to 1024 words, I have to create an array of 1024 values and the same for tagpaths that I am writing to.

So for writing from Ignition to plc for 2 words takes ~3ms but for 1024 it takes ~500ms. So I have a very rookie question on this, does it mean that my Python script is taking a very long time to write to all those 1024 words since it is a scripting language and that is what is making it slow?

To get around that, is it true if I had the same code in a pre-compiled format it would not take so long to complete this task?

Thanks![/quote]

I’d guess that you’re waiting on network I/O, not python. If you get the wireshark capture of the exchange it would be easier to see what’s going on.