Register an OPC UA Extractor

This topic describes the steps to register and configure an OPC UA extractor for OPC UA data to egress to FactoryTalk DataMosaix.
Prerequisites
  • A project is created using FactoryTalk DataMosaix.
Register an OPC UA Extractor
  1. On the Management Console, select the
    Extractor Info
    tab.
    The Extractor list is displayed.
    Extractor Info tab
  2. Click the Add [+] icon.
    The
    Extractor Info Detail
    page is displayed.
    Extractor Info Detail screen
  3. Provide a unique name for your Extractor. The Source Name works as the identifier for your extractor. You can search for an extractor with the Source Name. By default, DataMosaix generates a source name.
    Source Name example: EXT_1406230728_createproject_v1.
    Here, EXT stands for extractor, 140623 is the date in ddmmyy format, 0728 is the timestamp in hhmm format, and createproject_v1 is the project in which you are currently working. You can use the default source name or create your own.
  4. Provide the location details for which you are creating the extractor. This is information can help you to identify an extractor when you have many extractors for different plants/sites/locations.
  5. From the
    Associated Roles
    drop-down list, select at least one role. You can refer to various roles and capabilities by clicking
    Role Reference
    .
    NOTE:
    The Associated Roles drop-down is visible and available only for Project Admin users or users within the Organization with a Project Admin Role assigned.
    You can select multiple roles from the Associated Roles drop-down list. In the search bar, you can search for any specific role from the list. If you want to apply all the roles to the application, select the
    Select All
    checkbox.
    Next, you can select a pipeline or create a new pipeline. When you create a new pipeline, you have the option of selecting from an existing dataset or creating a new dataset.
  6. From the pipeline drop-down, select a pipeline. On selecting a pipeline, the Pipeline External ID and Dataset Name fields are generated.
    To create a new pipeline, select the
    + Create Pipeline
    option.
    The
    Create Pipeline
    dialog box is displayed.
  7. Provide the following Pipeline information to create a new pipeline:
    • Pipeline Name
    • Pipeline External ID
    • Pipeline Description
  8. When you create a pipeline, you can either select an existing dataset or create a new dataset. Select a Dataset from the
    Dataset Name
    search field, if you want to use an existing Dataset.
    If you choose to create a new Dataset, the Dataset related fields are displayed. Provide the following dataset information:
    • Dataset Name
    • Dataset Description
  9. Click
    Add
    . Based on the options you choose (select or create), the Pipeline and Dataset information is either populated or created and displayed on the Extractor Info Detail page.
  10. Select the source type of extractor as OPC UA.
    The fields relevant to the OPC UA extractor appear on the screen for you to fill in details.
    Extractor Info Detail - OPC UA Extractor
  11. In the Endpoint URL, provide the URL of the OPC UA server that you want to connect to.
  12. In the OPC Server Username and Password fields provide the credentials to connect to the OPC UA server if you need it. If the OPC UA  server is on local host you can leave it blank.
    NOTE:
    The
    Save and Apply
    button enables after you provide all the required details.
  13. Click
    Save and Apply
    .
    The
    Generated info Saved
    dialog box is displayed and it contains the configuration information. You can view the configuration file details by clicking
    View generated configuration file
    . Alternatively, you can also copy and save the information for future use by clicking
    Copy All
    . More importantly, you can download the .yml file that includes all the configuration information that you can use to run the extractor.
    Extractor Configuration File Download
  14. Click
    Download
    .
    The .yml file is downloaded in the Downloads folder of your local machine.
  15. Click
    Close
    to close the dialog box.
    The new extractor is displayed under Extractor Listing.
  16. Navigate to your project in CDF by clicking
    Continue to Main Site
    and select
    Integrate
    >
    Connect to source systems
    .
    Connect to Source Systems
  17. On the Extract data screen, locate the
    Cognite OPC UA Extractor
    and select it.
    Cognite OPC UA Extractor
  18. Download the extractor to your local machine.
  19. Copy the downloaded .yml file to the folder where the extractor is installed.
  20. Run the extractor on the command line.
  21. Once the extractor has been configured and executed successfully, navigate to your project in CDF and open the pipeline by selecting
    Integrate
    >
    Monitor Extractors
    .
  22. Click the pipeline link.
    You should see the information mentioning that the extractor has run successfully.
    Extractor Success Info
  23. Click on the Data set link under basic information section to open the Data set details.
    Click Data Set Link
  24. Click on the Data tab.
    You should see the asset and time series data.
Troubleshooting the OPC UA Extractor
  • Use a yml Lint site to validate your yml file.
  • It is recommended to run the extractor from the command line rather than as a service if you are facing problems. By running the extractor on the command line, you'll see better error messages, than trying to get them via the windows service log file.
  • Ensure that the extractor is called config.yml and it is inside the config directory or - if you're passing the config directory, you are using the correct path.
  • Look at the log file in the logging folder (as configured in the configuration file) for any error messages. If the location of the log file is not specified in the config file, look under C:\Cognite\OPCUAExtractor\logs
  • Double-check that OPC UA endpoint URL is correct and, if required, the username and password. You may need quotes around username, password, and server name.
  • Double-check that all references to the dataset and pipeline IDs are correct.
  • Double-check that the client ID and secret in the on-prem configuration file are correct.
  • If you start the extractor but the dataset remains empty (no linked timeseries), this may be because the timeseries already existed before the extractor ran successfully and those timeseries are not linked to the dataset. Try one of the following:
    • Change the value of the
      id-prefix
      field in the extraction section of the config yml file and restart the extractor.
    • Using Postman or your favorite API client, delete all timeseries and restart the extractor.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.