OPC Classic client to server connection

Connecting to the OPC Classic server is part of configuring the OPC Classic Client Source block.

Drag the OPC Classic client source block from the Real-time IO (input & output) menu onto a fresh canvas.

Double click the OPC Classic client source block to configure the block properties. Below the properties window, an explanation of each property can be found.

Data Source: Open the OPC Classic connection dialog by clicking [Data Connection Selection] denoted by the ellipses adjacent to the [Data Source] text box.

  • Computer name: OPC Classic server machine name. Click [Browse] to get a list of OPC Classic servers on the machine. Enter “localhost" when connecting to the local machine. The associated OPC Classic server ID must be a valid server on the specified machine.

  • User name and password: might be necessary depending on the machine to which the connection is established. Available from your system administrator.

  • Click [Browse] to list the available OPC Classic servers.

  • Available OPC Classic servers: All OPC Classic servers available will be listed, as well as their Server ID, and the interfaces that they support.

  • OPC Server ID: By selecting a server, the Server ID will automatically be populated.

  • Server Creation: Select the sever creation method by toggling the [server creation] radio button group. This determines the way the server is created by COM.

    • Inproc server: (default setting, used in almost all connections) IN PROCess server: the server is running on either a remote or a local machine.

    • Inproc handler: the server is running on a local machine.

  • Connection type: Select the connection type by toggling the [connection type] radio button group.

    • DA: Data Access: Real-time data connection

    • HDA: Historical Data Access: Historical data connection

    • NOTE: Make sure the connection type is valid. The specified server may only accept a single type of connection. Either DA or HDA, make sure this information is correct on both the server and OPC Classic Client Source block settings.

    • When configuring a Discrete OPC Classic Client Source block, the connection type radio button group has been disabled. Only an HDA connection type may be used, make sure this information is also correct in the OPC Classic server.

    • A DA connection implies that the data being read will be the data in the OPC Classic server at the time of query, whereas the HDA connection refers to the start time of the data being read being determined solely by the data import window start time.

  • [Test] to see if a connection to the server can be established.

  • NOTE: to establish a valid connection to the specified OPC Classic server, denoted by the computer name and the OPC Classic Server ID, the OPC Classic server must be running.

  • [OK]

Reconfiguring/Reconnecting the OPC Classic Client Source connection

  • If the blueprint is currently executing, reconfiguring the server connection will only take affect when the blueprint is stopped and restarted. This is because the blueprint is run in a separate execution thread.

  • When the connection to the OPC Classic server is lost during execution, the OPC Classic Client Source block will attempt to reconnect to the server every 60 seconds. While the connection is broken, the field values and timestamps in the output port will remain unchanged. When the connection is re-established, the execution will continue as before the connection was lost.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025