Creating a data source

You can connect your data sources to your App Connect Standard applications by using the IBM® App Connect for Manufacturing built-in nodes. Configuring the datasource with OPC UA server security settings is a one-time task.

Before you begin

  • Ensure that you have configured the database connection. For more information, see Connecting to the database from Toolkit.
  • Generate a self-signed certificate. For more information, see Generating self-signed SSL certificate.
  •  Self-signed certificate  Check the OPC UA Server configurations.
    • Ensure that the Security Mode does not have a value of None.
    • Ensure that the Security Policies are enabled.
  •  Self-signed certificate with username and password  Check the OPC UA Server configurations and set the Username and Password authentication details.
  • For IBM App Connect Enterprise version 11.0.0.8 or later, for certain OPC Servers, may need to request and install APAR IT35396. For more information, see ServiceFault: Bad_CertificateUriInvalid (0x80170000) error.
  • In the server workstation, manually trust the client certificate. Move the client certificate from the rejected folder to the certs directory in the PKI folder. The Source Items are loaded only after you trust the certificate.

About this task

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

Procedure

To create a data source, complete the following steps.

  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 basically a physical address available on a network that allows clients to access one or more services provided by a server. Depending upon your choice,
    • Discovery - The server URL is considered as the Discovery URL.
    • Endpoint - The server URL is considered as the Endpoint URL. If the provided Endpoint URL is correct, it skips the discovery process.
    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.
    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.
    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.
    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 Request, before marking the client as inactive. The Subscription is then deleted by the OPC Server.
    The default value is 5000 milliseconds.
    Queued PubReq Count The number of the Publish Requests to be queued with the OPC UA Server. The default value is 1.
    User Name Enter the user name, if the OPC UA server authentication is enabled. If the message flow uses username and password, the datasource stores password using secure storage vault at runtime. For more information, see Using 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 Enter the password you provided in the 5.a step 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 Enter notes for the datasource, if any.
  4. Enter 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, IBM 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. Click the newly created data source from the DataSources view. 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.