14.2. Connecting

All scenarios for the DataHub External Historian begin with a connection from a DataHub instance to a historian. Here's how to configure a connection.

Preliminaries

  1. Ensure that the DataHub program is installed and running.

  2. In the DataHub Properties window, go to the InfluxDB option and check the boxes for InfluxDB and Chronograf, and click Apply.

    [Note]

    The online product documentation for InfluxDB and Chronograf can be found here.

  3. Start DataPid, and check the Data Browser to ensure that its data is updating.

External Historian

  1. In the DataHub External Historian option click the Add button.

  2. In the Edit Historian Connection window, configure a local InfluxDB connection as follows:

    If you don't have a user name or password for InfluxDB, you can leave those fields blank. If you have previously installed InfluxDB independently of the DataHub program installation, then you'll need to use your existing InfluxDB URL.

  3. In Available Points select just the Mv point in the DataPid domain, under PID1. You can add more points later, if you'd like.

    The point DataPid:PID1.Mv will appear in Selected Points.

    When finished, click OK and Apply. You have now created an InfluxDB database and are collecting a history of values for the DataPid:PID1.Mv point.

Checking Updates

It is possible to check updates using the DataHub Event Log.

  1. Select your connection in the Write data to Historians list and click the Edit button to open it.

  2. In the Connection Settings, check the Log writes at information level box, and click OK and Apply.

    [Note]

    If this box is not checked, this information is only displayed in the Event Log when its Debug option is selected.

  3. Open the Event Log to view data updates.

Check Chronograf

You can check Chronograf to view updates to the InfluxDB database.

  1. In the InfluxDB option, ensure that both InfluxDB and Chronograf are running, and click the Chronograf Open in Browser button.

  2. Go to Dashboards and click + Create Dashboard, then + Add Data.

  3. Choose DataHubDB1.Influx1, in DataPoints choose pointname then PID1.Mv.

  4. Under Fields select value.

    You should start to see some data appear in the trend at the top of the display. You can change the dashboard name from Untitled Graph to Source (DH1) Logged to Influx1, and click the green checkbox to save the dashboard.

    Please refer to the Chronograf documentation for more details.

Adding Points

You can add more points by simply adding them to the External Historian configuration.

  1. Select your connection in the Write data to Historians list and click the Edit button to open it.

  2. In Available points select more points, such as DataPid:PID1.Pv and DataPid:PID1.Sp.

  3. When finished, click OK and Apply. You are now collecting historical data on these points as well.

  4. You can check your results in Chronograf. You will need to reconfigure the graph by selecting the two additional points, and turning on the Group by pointname option.

    There should now be three trend lines in each display.