Skip to content

Connectivity

OPC DA (classic OPC) communication

Connects as a client to an OPC DA 2.05a server on this computer or on another computer on the network. Reads and writes items by ProgID and ItemID.

Overview

OPC DA is the classic, Windows-specific OPC interface (COM / DCOM). The driver connects as a client to an OPC DA 2.05a server and uses no port. The server can be on this computer or on another computer on the network.

Use this driver if a device can be reached only through an OPC DA server. If the server also offers OPC UA, prefer the OPC UA driver.

What to set up on the computer and the server

  1. Install the OPC Core Components

    The OPC Core Components of the OPC Foundation must be installed on the Live computer. If they are not installed, connecting to the server returns the error IOPCServer interface is not available.

  2. Start the server and find its ProgID

    The OPC server must be installed and running. Find its ProgID in the documentation of the server or with an OPC client tool.

  3. Check the bitness

    Live runs as 32-bit (x86). A 64-bit server must also be accessible with a 32-bit client.

  4. Set up DCOM for a remote server

    If the server is on another computer, DCOM and firewall settings are needed. See the DCOM section below for details.

Setting up the connection in Studio

  1. Add a connection

    In the Connections section click Add and choose OPC DA as the communication driver. This driver has no port; the cell is locked.

  2. Specify the location of the server

    If you leave the IP address cell empty, the server is on this computer. If the server is on another computer, enter its name or IP address.

  3. Enter the parameters

    Fill in the fields below in the inspector. The Target card shows the computer name and the ProgID together.

  4. Add tags

    In the HMI Tags section create tags and type the full name of the item on the server (ItemID) in the Address cell. See the HMI tags page for details.

  5. Watch the status

    Online › Test connections does not test OPC DA connections. Save the project and load it into Live; the state and the last error message appear in the Connections section of the system menu.

Field Meaning
OPC server (ProgID) Required. If empty, Check project reports an error and Live cannot connect.
Update rate (ms) 10 – 60000, default 250. The interval at which the server refreshes its values; it should not be larger than the read cycle of the tags.
Read source Server cache (fast, default) or Device (goes to the device on every read, slow).
DCOM identity The Windows user running Live (default) or User name and password. Needed only for a server on another computer.
User name Can also be written as ALAN\kullanıcı. The password is not written to the project file; it is entered in Live.

DCOM and security

  • Local server: the Windows user running Live stays selected as the DCOM identity. If the server runs with another account, that account must have permission to launch and access the server.
  • Remote server: in the DCOM settings of the OPC server on the remote computer, grant launch and access permission to the connecting user. If you choose a user name and password, you can use the form ALAN\kullanıcı.
  • DCOM / RPC traffic must be open in the firewalls between the Live computer and the server. Before connecting to a remote server, check the permissions and the firewall on the server computer.
  • The password is entered in Live with the Enter password button under Connections in the system menu; the Settings authorization is required. The password you enter is stored unencrypted in the baglanti_sifreleri.json file on the Live computer; open the project data folder only to the account that runs Live.

Address format

Example item IDs
 Random.Int4 // An item of the server itself   Kanal1.Cihaz1.Tag1 // Item with channel, device and tag levels   Simulation.Tank1.Seviye // Group and item name  
  • The syntax of the item ID belongs to the server. Studio only checks that it is not empty, contains no control characters and does not exceed 1024 characters; the server does the validation. A wrong ID appears in Live as a tag error.
  • Several OPC DA connections, each with a different ProgID, can be defined to the same computer.

Data types

  • Bool
  • Byte
  • SInt
  • Int
  • UInt
  • DInt
  • UDInt
  • Real
  • LReal
  • String
  • DateTime

WString is not supported; OPC DA strings are already Unicode, so use String. Array tags are not supported. A write is made as a single value, converted to the data type of the item on the server.

Read and write behavior

  • The driver opens a single active OPC group and adds one item per tag (at most 250 items per request). Reading is done in bulk (at most 500 items per request).
  • Quality: if the server reports the quality as good or uncertain, the value is used. If it is bad, the tag gets an error. While the server is waiting for the first data, the tag stays in the waiting state and gets no error.
  • A written tag is read back at once. If the connection drops, the driver retries after 1 s, 2 s and 5 s, then every 10 s. For the behavior common to all drivers see the communication drivers page.

Limits

  • It is an OPC DA 2.05a client only. There is no OPC HDA or OPC A&E, and no data is offered as an OPC DA server.
  • The driver is Windows-specific (COM).

Common errors

Connection messages appear in the Connections section of the system menu in Live. For tag errors during reading no message is shown; the tag only gets bad quality.

Message Cause and fix
The name of the OPC server (ProgID) is not entered in the connection Fill in the OPC server (ProgID) field.
The OPC server … is not registered on this computer The ProgID is wrong or the server is not installed. For a remote server the message says “… is not registered on the computer”.
Could not connect to the OPC server: the OPC DA interface (IOPCServer) of the server is not available The OPC Core Components are not installed, or the bitness of the server and the client does not match.
The OPC server … denied access (DCOM permissions) There is no launch or access permission in DCOM. On a remote server also check the user name and password.
The OPC server on the computer … cannot be reached (RPC server unavailable) The remote computer is off, or the network or a firewall blocks it. Check the DCOM / RPC ports.
The OPC server is in a failed state (OPC_STATUS_FAILED) · The OPC server has no configuration (OPC_STATUS_NOCONFIG) The own configuration of the server is missing or faulty.
The OPC server did not accept the item The item ID does not exist on the server or is invalid.
OPC quality is bad: not connected to the device The problem is on the device side of the OPC server. Check the own diagnostics of the server.

Frequently asked

How do I choose between OPC UA and OPC DA?

If the server also offers OPC UA, prefer the OPC UA driver; signed and encrypted communication exists only there. Use OPC DA when the device can be reached only through an OPC DA server.

Related pages

Try the demo

Download the demo, open the sample project and see this feature on your own screen.