Best way to write to PLC array

I have looked through the forum and documentation and I am not clear on what the best way to write to an OPC Item array is.

Writing an array value via system.tag.writeBlocking is probably the easiest way.

So I should create two lists? Do you have an example? I have an array of 300 that I need to update.

Something like this?

image

That looks about right. You can also use some list comprehensions instead of the for loops to do the same thing in a more compact way.

Something like this:

Perfect. Thanks