OPC Connector

The get_opc_client function is responsible for loading the configuration and returning an OPCClient instance of OPCClient.

Parameters

server_name (str): The name of the OPC server configuration to load from 'config.json'.

Returns

OPCClient: An instance of OPCClient configured for the specified OPC server.

Description

This version of OPC_Connector allows the creation of multiple OPC connections, each determined by an OPC Server name. Configuration for each connection must be defined in 'config.json'.

Example

from OPC_Connector import get_opc_client

    # Get an OPCClient instance for a server named 'MyServer'
    opc_client = get_opc_client('MyServer')