Creating a data source

A data source is used to establish connection between the OPC client and server.

Before you begin

Generate a self-signed SSL certificate.

About this task

To create a data source, complete the following steps.

Procedure

  1. Navigate to Manufacturing Perspective > DataSources.
  2. Right-click the Source folder and select Add Mapping Node.
    The Name Mapping Node wizard window loads.
    Tip: To duplicate an existing data source, click Duplicate Mapping Node and specify a data source name. All properties of the existing data source are copied to the new one. You can edit the properties, as required.
  3. Specify a name for the mapping node and click OK.

    The new data source gets created under the DataSource Properties window.

    Property Default value
    DataSource Kind OPCUA
    Server URL Type Displays an endpoint (URL) for a OPC UA server, which is a physical address available on a network that allows clients to access one or more services provided by a server.
    • Discovery

      The server URL is considered as the discovery URL.

      For more information on the Use Discovery Server option, see Fetching OPC Servers for a Discovery Server.

    • Endpoint

      The server URL is considered as the endpoint URL. If the provided endpoint URL is correct, it skips the discovery process.

    Server URL The URL of the OPC UA server.

    The URL path of the discovery or endpoint URL.

    Message Security Mode You can choose the message security mode on how the data must be transferred for the connected OPC UA server from the drop-down list.
    The following are the message security mode options:
    • Signed
    • Signed and encrypted
    • None
    The default value is None.

    If you set the Message Security Mode to None, you can only set the Security Policy to None.

    Warning: Be careful while using the security mode as None.
    Security Policy You can choose the security policy, which relates to the Message Security Mode for the connected OPC UA server from the drop-down list. The default value is None.
    Important: It is recommended to use encryption for secure communications. For example, the AES256 security policy. If the mode is set to None, messages that are exchanged between the client and server application are unsecured and subject to security threat.
    Protocol The protocol to be used. The default and the only currently supported value is opc.tcp.
    Message Encoding The data encoding format to be used. Currently only binary is supported. The default value is BINARY.
    Update Interval The Publishing Interval, in milliseconds, when the OPC UA server returns data change notifications to the client. The default value is 1000 milliseconds.

    This property cannot remain empty or null and accept only numeric values.

    Server Keep-Alive Used to calculate the maximum keep-alive count as follows.
    Max keep-alive count = Sever Keep-Alive / Update interval maximum

    Keep-alive count represents the number of publishing intervals that can be skipped, before the OPC server sends an empty notification if there is no data to send.

    The default value is 5000 milliseconds.

    This property cannot remain empty or null and accept only numeric values.

    Client Keep-Alive Used to calculate the lifetime count as follows.
    Lifetime count = (Client Keep-Alive + Update interval – 1) / Update interval

    Lifetime count defines the number of the publishing intervals to wait for a new Publish Requests, before marking the client as inactive. The subscription is then deleted by the OPC server.

    The default value is 5000 milliseconds.

    This property cannot remain empty or null and accept only numeric values.

    Queued PubReq Count The number of the Publish Requests to be queued with the OPC UA server.

    The default value is 1.

    This property cannot remain empty or null and accept only numeric values.

    User Name Enter the username, if the OPC UA server authentication is enabled.
    Note:
    • Use this option only if the OPC server allows you to connect by using username and password.
    • If you keep the User Name and Password fields blank, the client defaults to anonymous mode.

    If the message flow uses username and password, the datasource stores password by using the secure storage vault at runtime. For more information, see Eclipse-secure storage vault.

    Password Enter the password for the user name, if the OPC UA server authentication is enabled.
    Client Private Key file Specify the absolute path of the clientPrivateKey.pem file. Applicable only if the OPC UA server security settings are configured.
    Private Key Password Specify the password you provided in the Step#2e of the Generating self-signed SSL certificate topic.
    Client Certificate file Specify the absolute path of the clientCertificate.pem file. Applicable only if the OPC UA server security settings are configured.
    Server Certificate file Specify the absolute path of the serverCertificate.der file. You can get a server certificate from the PKI directory of the server.

    For example, C:\Users\<username>\.acmfg\PKI\CA\certs\<serverCertificate.der>.

    Applicable only if the Server URL Type is Endpoint.

    Notes Specify the notes for the datasource, if any.
    • Take note of the following validations for each of the editable data source properties.
      • The User Name or Password cannot be null if the credentials have been provided during the authorization.
      • The Client Private key file, Private Key Password, Client Certificate file, and Server Certificate file must not be set if the security mode and security policy is set to None.
      • The Client Private key file, Private Key Password, and Client Certificate file path must be provided if you are connecting by a secure connection to an OPC server.
  4. Specify the required configuration values, and click Create Data Source.

    You can see the data source activity in the Logging view.

  5. Optional: Click Update Data Source to update the data source configuration values or click the Refresh Source Item Tree to fetch latest source item list for the selected data source.

Results

You have now mapped your data source securely with your OPC UA server, which enables the client to retrieve the OPC UA server information. On successful connection of a data source, App Connect for Manufacturing allows you to create Client Item and map it to the available source item from the OPC server.

What to do next

Verify that the data is being retrieved from your mapped OPC UA server.
  • Release 13.0.0.1

    When you open the Manufacturing perspective, you see the status for each of the datasource as Connected (Green) or Disconnected (Red). After connecting to datasource, the status changes from disconnected to connected. When you create a new datasource, it's status is disconnected until you connect to it. Click Refresh source item tree to get the current status of data source.

  • The DataSource Properties view displays the datasource configuration values used to connect to the OPC server.
  • The Source Items view displays the address space of the OPC server in a tree structure view (source items).
  • Expand the Source Items tree to load the source items. You can hover the mouse pointer over a source item to view all the attributes.