Integrate SQL and PLC data at the edge.

How-to ExamplesArchitecture → Edge SQL-PLC


Download the sample solution: Edge SQL-PLC Example.dbsln

This guide shows how to configure the Devices module to read data from a field device and write it to a Historian SQL database.


Configuration workflow

  1. Create Tags – Define the tags to store values.

  2. Create Devices – Set up a PLC/value simulator (or a real connector).

  3. Create Historian – Configure the connection to your SQL database.

Step 1: Create the Tags

  • In Unified Namespace → DataTemplate, create a template named PVs with 10 members.

  • In Unified Namespace → Tags, create a tag named PVs using the PVs template.

Result: one tag (PVs) containing 10 members.

Step 2: Create Communication

For this example, we use the Value Simulator Connector to generate test values:
Value Simulator Connector - FrameworX 10.1 - Tatsoft LLC


You can substitute any supported connector for a real device. See the Devices Module How-to Guide for connection details:
Devices Module How-to Guide - FrameworX 10.1 - Tatsoft LLC

Devices/Points table

The Devices/Points table lists all created tags. The Address column indicates where each point reads from in the configured connection. For the Value Simulator driver, it also defines how the random value is generated.

TagName

Node

Address

Tag.PVs.Vibration

Node.ValueSimulatorNode

FLOAT:0;100

Tag.PVs.Torque

Node.ValueSimulatorNode

INTEGER:0;100

Tag.PVs.Temperature

Node.ValueSimulatorNode

FLOAT:20;120

Tag.PVs.Speed

Node.ValueSimulatorNode

INTEGER:0;3600

Tag.PVs.Valve_Open

Node.ValueSimulatorNode

BOOL:0;1

Tag.PVs.pH

Node.ValueSimulatorNode

INTEGER:2;12

Tag.PVs.Level

Node.ValueSimulatorNode

SINE:0;30

Tag.PVs.Humidity

Node.ValueSimulatorNode

INTEGER:0;100

Tag.PVs.Flow_Rate

Node.ValueSimulatorNode

FLOAT:0;1000

Tag.PVs.Current

Node.ValueSimulatorNode

FLOAT:0;50

Step 3: Create a Historian connection

In Historian → Historian Tags, add the tag created earlier and configure the settings as follows:

TagName

DeviationDeadBandType

HistorianTable

Tag.PVs

Percentage

Historian.Table.TableIndustrial

The table used is pre created in the solution and uses SQLite, if you wish use another database provider, check the link below:

Historian Module How-to Guide - FrameworX 10.1 - Tatsoft LLC


Step 4: Test and Monitor

Go to Runtime / Startup and Run Startup

Communication Testing

  1. Open Property Watch

  2. Monitor tag values:

    • Check Quality (192 = Good)

    • Verify values update

Data Collection Testing

  1. Go to Historian → Monitor

  2. Verify Archiving:

    • Check RowCount increasing

    • Monitor LastStoredTimeStamp

    • Review ErrorCount

  3. Test Retrieval:

    • Open the SQLite database in Datasets / DBs and “SQLite Admin…” button and see the data.


In this section...