Is system.opc.getServers() only supposed to return enabled connections?

I’m using system.opc.getServers() to get a list of the OPC connections configured on a gateway so that an operator can enable or disable individual connections from a perspective UI, but when a connection is disabled the scripting function no longer returns that connection in the list. The documentation doesn’t say anything about the connection state, only that all servers are returned. Is this the expected behavior?

It’s written that way, seemingly intentional for whatever reason, but is inconsistent depending on what scope it’s called from. This was discussed here previously: [bug-10419]system.opc.getServers() returns different results Perspective v.s. Vision

It doesn’t look like there’s been any movement towards changing this yet.

Hmm, after a closer look, it seems that parameter was implemented and released in 8.0.14.

Thanks for the quick reply! I had not seen the other thread, could you please add the includeDisabled parameter to the manual page for this function? That would have saved me a lot of head scratching.

1 Like

Sorry about that. Looks like the docs missed the parameter due to some shenanigans. The parameter is listed on the page now.