Integrate Kepware KEPServerEX with Tiger Cloud
Stream OPC tag data from Kepware DataLogger into Tiger Cloud and store it in a hypertable
Kepware KEPServerEX is an industrial connectivity platform that logs OPC tag data from controllers and sensors to ODBC-compliant databases using Kepware DataLogger.
This page shows you how to configure Kepware DataLogger to stream OPC data into Tiger Cloud and store it in a hypertable.
In this integration guide, you:
- Create a target hypertable in your Tiger Cloud service.
- Configure a Kepware DataLogger log group and ODBC DSN.
- Verify data flows into the target hypertable.
Prerequisites for this integration guide
To follow these steps, you'll need:
-
These steps use Tiger Cloud, but the same approach applies to a self-hosted TimescaleDB instance.
- Your connection details.
- A running Kepware Server EX installation with the DataLogger add-on.
- The PostgreSQL ODBC driver installed on the Kepware host.
Prepare your service
Section titled “Prepare your service”Create the target table in Tiger Cloud before DataLogger begins writing. Convert that table to a hypertable so your OPC time-series data is partitioned and chunked correctly.
If Kepware DataLogger creates the table for you, convert it to a hypertable before you enable the log group.
- Connect to your Tiger Cloud service
Use the Tiger Console or another SQL editor to connect to your Tiger Cloud service.
- Create the target hypertable
Create the table directly as a hypertable partitioned on the
timecolumn:CREATE TABLE kepware_telemetry (time timestamptz NOT NULL,tag_name varchar(128),value varchar,quality varchar(32)) WITH (timescaledb.hypertable,timescaledb.chunk_interval = '7 days');The
chunk_intervalsetting controls how much data each hypertable chunk holds. A 7-day interval works well for most OPC ingestion workloads. If you have high-throughput tag updates, consider a shorter interval like 1 day. You can adjust this later withset_chunk_time_interval().
Configure Kepware DataLogger
Section titled “Configure Kepware DataLogger”Point DataLogger at your Tiger Cloud hypertable and choose a table write mode that preserves data.
- Open the log group configuration
In DataLogger, open your configuration, then add a new log group or edit an existing one.
- Configure the ODBC DSN
In the log group settings, click the browse button for
DSN, then selectConfigure DSN…to open the Microsoft ODBC Data Source Administrator.On the System DSN tab, click
Add, choose the PostgreSQL ODBC driver for Tiger Data, and complete the driver wizard. - Select the Tiger Cloud DSN
In the log group settings, choose the DSN you created for Tiger Cloud.
If required, enter the DSN
UsernameandPasswordfor the Tiger Cloud service. - Point the log group at the hypertable
Set
TableSelectiontoCreate a new table once and always append to this tableand enterkepware_telemetryas the table name.Leave
Create Table If Missingunchecked so DataLogger writes to the existing hypertable instead of creating a plain table. - Add OPC tags to the log group
Add the server items or OPC tags you want to log. Use
Narrowtable format for the schema above, because the target hypertable stores one row per tag update with generic columns such astag_name,value, andquality.In narrow mode, DataLogger uses a single column-mapping object for all log items. Map
Timestamptotime,NameorNumericIDtotag_name,Valuetovalue, andQualitytoquality. - Enable the log group
Save the log group and set
EnabledtoYes.DataLogger begins sending OPC updates to your Tiger Cloud hypertable when the log group is enabled.
Stream OPC data to your service
Section titled “Stream OPC data to your service”A configured log group will only move data after an OPC tag update occurs.
- Generate a tag update
Trigger a value change on the configured OPC tag or wait for the polling interval so DataLogger logs a row.
- Confirm the data landed in Tiger Cloud
Run the following query in Tiger Console or another SQL editor:
SELECT time, tag_name, value, qualityFROM kepware_telemetryORDER BY time DESCLIMIT 10;You should see recent rows from Kepware, with
timereflecting when the tag value was logged.
You have successfully integrated Kepware KEPServerEX with Tiger Cloud.
Troubleshooting
Section titled “Troubleshooting”- The DSN driver is not listed: install the PostgreSQL ODBC driver and open the 32-bit ODBC Data Source Administrator on Windows.
relation "kepware_telemetry" does not exist: verify the log group table name iskepware_telemetryand that the hypertable exists before enabling the group.- DataLogger created a plain table: convert the table with
SELECT create_hypertable('kepware_telemetry', 'time');and keepCreate Table If Missingunchecked. - No rows appear after enabling the group: confirm the log group is
Enabledand that the configured OPC tags are updating.