Disable an opc connection by script (java/jython code)?

I would like to disabled an opc-ua server connection by script.
Can we achieve this with java/jython code ?

Does anybody have an answer to this? I have a need for this also.
Thanks.

Unfortunately there does not appear to be any way to do this currently. Closest you can get is being able to enable/disable devices on the Ignition OPC-UA server through scripting.

Over a decade later… is there now an option for this.

Only want the primary to have server enabled, if primary is down, would like to script or other option to enable the OPC-UA server on the secondary/fail over server.

Looked at the docs yet?

3 Likes

Standby Activity Level
Cold - The system connects to all OPC servers but does not subscribe to Tag values. The Ignition OPC UA server does not communicate with any device, but third party OPC UA servers may still have device connections. This allows the system to standby without putting additional load on the devices and network. Failover takes slightly longer, as Tags must be subscribed and initialized.

Do you actually want no connection at all or do you just not want the backup server to communicate and put load on the devices / network? Because a Cold spare is likely just the better route from what you're asking.

Otherwise you can read about the OPC functions in the manual:

That answer to the original question in this topic is: system.opc.setServerEnabled | Ignition User Manual

2 Likes