Create OPC Device Connection From Script

For my workflow I need to create around 60 different Modbus-TCP OPC device connections. I was wondering if there's a way to create them with scripting.

I've found a way to query the current devices using the following code (method doc). Just wondering if there's a way to create a device in the same manner as well.

devices = system.opc.browseServer(serverName, "Devices")
1 Like

If you want example code, or want to skip having to write a script at all, you might find this Exchange project helpful:

Particularly if you want to make a bunch of tags and/or UDT instances to go with them.