Advanced Serial Data Logger

Trust In Confidence!

For Windows 2000 - Windows 10 (2016) (incl. Server, x86 and x64). Latest version: 4.3.3 build 809. .


VKT-7 by Teplocom. Automatic retrieval of current data or accumulated data. OPC server.

Preliminary requirements

Typically, the VKT-7 device is connected to the computer via an RS-232 serial port (COM port) and sends data using a nonstandard version of the Modbus RTU protocol.

You can also connect it to the computer via an RS232-to-Ethernet convertor. In that case, you can access the heat calculator unit remotely over a network.

If you are using a GSM modem with the device, make sure that the modem can automatically connect to the Internet.

Setup

If VKT-7 is connected to the computer via a COM port, you need to install Advanced Serial Data Logger (see the top link).

If the device is connected to the computer via a local network or over the Internet, you need to install Advanced TCP/IP Data Logger (see the top link).

You also need to install the "Binary parsers" module, which enables the logger to work with VKT-7. The module will send data requests to the heat calculator unit on a schedule, process its responses, and prepare data for exporting.

Communication settings

1. Configure the heat calculator unit connection, that is, COM port or TCP connection parameters (figures 1 and 2).

COM port (RS232) settings
Figure 1.1

TCP settings
Figure 1.2

2. Select the parser module for the VKT-7 device in the program's settings. If the heat calculator unit is connected to the computer via a COM port, you also need to select the respective data request module (figure 3; the module is not shown).

Selecting a parser module for VKT-7
Figure 1.3 Selecting a parser module for VKT-7

Data reading settings

You can specify the heat calculator unit's port number and device ID, which can be used when exporting data or writing data to a database (figure 1).

Data reading settings
Figure 2.1

Set up a data reading schedule in the parser module's settings (figures 2 and 3). You can set up a separate schedule for each data type (current, hourly, daily, or accumulated data).

Data reading settings for current data
Figure 2.2 VKT-7. Current data

Data reading settings for accumulated data
Figure 2.3 VKT-7. Accumulated data

Writing data to a database

You can use the "ODBC Database" data export module to write data to a database. The module can write data to almost any database, provided that there is a respective ODBC driver.

You can write data from multiple heat calculator units to a single database table. In that case, each row will contain a unique device ID and a port number.

1. Manually create a table with the necessary rows and columns (fields) in your database. Below you can find some table-creating scripts that we recommend to use.

CREATE TABLE dbo.[DATA] (
   [ID] decimal(10,0)  IDENTITY(1,1) NOT NULL,
   [DATE_TIME_STAMP] datetime NULL,
   [DATA_SOURCE_NAME] nvarchar(32) NULL,
   [DEVICE_ID] nvarchar(32) NULL,
   [DEVICE_NAME] nvarchar(32) NULL,
   [DEVICE_DESC] nvarchar(32) NULL,
   [TIMESTAMP] datetime NULL,
   [TIMESTAMP_UTC] datetime NULL,
   [SERIALNO] nvarchar(32) NULL,
   [DATA_TYPE] int NULL,
   [DATABASE] int NULL,
   [EVENT] int NULL,
   [TV1_T1] real NULL,
   [TV1_T2] real NULL,
   [TV1_T3] real NULL,
   [TV1_V1] real NULL,
   [TV1_V2] real NULL,
   [TV1_V3] real NULL,
   [TV1_M1] real NULL,
   [TV1_M2] real NULL,
   [TV1_M3] real NULL,
   [TV1_P1] real NULL,
   [TV1_P2] real NULL,
   [TV1_Mg] real NULL,
   [TV1_QO] real NULL,
   [TV1_QG] real NULL,
   [TV1_DT] real NULL,
   [TX] real NULL,
   [TA] real NULL,
   [TV1_BHP] real NULL,
   [TV1_G1] real NULL,
   [TV1_G2] real NULL,
   [TV1_G3] real NULL,
   [TV2_T1] real NULL,
   [TV2_T2] real NULL,
   [TV2_T3] real NULL,
   [TV2_V1] real NULL,
   [TV2_V2] real NULL,
   [TV2_V3] real NULL,
   [TV2_M1] real NULL,
   [TV2_M2] real NULL,
   [TV2_M3] real NULL,
   [TV2_P1] real NULL,
   [TV2_P2] real NULL,
   [TV2_MG] real NULL,
   [TV2_QO] real NULL,
   [TV2_QG] real NULL,
   [TV2_DT] real NULL,
   [TV2_BHP] real NULL,
   [TV2_BOC] real NULL,
   [TV2_G1] real NULL,
   [TV2_G2] real NULL,
   [TV2_G3] real NULL,
   [EVENT1] real NULL,
   [EVENT2] real NULL,
   [EVENT_TIME1] real NULL,
   [EVENT_TIME2] real NULL,
   [DI] real NULL,
CONSTRAINT [PK_DATA] PRIMARY KEY ([ID] ASC) 
WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE `DATA` (
   `ID` int(11) NOT NULL auto_increment,
   `DATE_TIME_STAMP` DATETIME NULL,
   `DATA_SOURCE_NAME` VARCHAR(32) NULL,
   `DEVICE_ID` VARCHAR(32) NULL,
   `DEVICE_NAME` VARCHAR(32) NULL,
   `DEVICE_DESC` VARCHAR(32) NULL,
   `TIMESTAMP` DATETIME NULL,
   `TIMESTAMP_UTC` DATETIME NULL,
   `SERIALNO` VARCHAR(32) NULL,
   `DATA_TYPE` INTEGER NULL,
   `DATABASE` INTEGER NULL,
   `EVENT` INTEGER NULL,
   `TV1_T1` DOUBLE NULL,
   `TV1_T2` DOUBLE NULL,
   `TV1_T3` DOUBLE NULL,
   `TV1_V1` DOUBLE NULL,
   `TV1_V2` DOUBLE NULL,
   `TV1_V3` DOUBLE NULL,
   `TV1_M1` DOUBLE NULL,
   `TV1_M2` DOUBLE NULL,
   `TV1_M3` DOUBLE NULL,
   `TV1_P1` DOUBLE NULL,
   `TV1_P2` DOUBLE NULL,
   `TV1_Mg` DOUBLE NULL,
   `TV1_QO` DOUBLE NULL,
   `TV1_QG` DOUBLE NULL,
   `TV1_DT` DOUBLE NULL,
   `TX` DOUBLE NULL,
   `TA` DOUBLE NULL,
   `TV1_BHP` DOUBLE NULL,
   `TV1_G1` DOUBLE NULL,
   `TV1_G2` DOUBLE NULL,
   `TV1_G3` DOUBLE NULL,
   `TV2_T1` DOUBLE NULL,
   `TV2_T2` DOUBLE NULL,
   `TV2_T3` DOUBLE NULL,
   `TV2_V1` DOUBLE NULL,
   `TV2_V2` DOUBLE NULL,
   `TV2_V3` DOUBLE NULL,
   `TV2_M1` DOUBLE NULL,
   `TV2_M2` DOUBLE NULL,
   `TV2_M3` DOUBLE NULL,
   `TV2_P1` DOUBLE NULL,
   `TV2_P2` DOUBLE NULL,
   `TV2_MG` DOUBLE NULL,
   `TV2_QO` DOUBLE NULL,
   `TV2_QG` DOUBLE NULL,
   `TV2_DT` DOUBLE NULL,
   `TV2_BHP` DOUBLE NULL,
   `TV2_BOC` DOUBLE NULL,
   `TV2_G1` DOUBLE NULL,
   `TV2_G2` DOUBLE NULL,
   `TV2_G3` DOUBLE NULL,
   `EVENT1` DOUBLE NULL,
   `EVENT2` DOUBLE NULL,
   `EVENT_TIME1` DOUBLE NULL,
   `EVENT_TIME2` DOUBLE NULL,
   `DI` DOUBLE NULL,
PRIMARY KEY  (`ID`)
) ENGINE=InnoDB;

CREATE TABLE "DATA" (
   "ID" SERIAL,
   "DATE_TIME_STAMP" timestamp DEFAULT NULL,
   "DATA_SOURCE_NAME" varchar(32) DEFAULT NULL,
   "DEVICE_ID" varchar(32) DEFAULT NULL,
   "DEVICE_NAME" varchar(32) DEFAULT NULL,
   "DEVICE_DESC" varchar(32) DEFAULT NULL,
   "TIMESTAMP" timestamp DEFAULT NULL,
   "TIMESTAMP_UTC" timestamp DEFAULT NULL,
   "SERIALNO" varchar(32) DEFAULT NULL,
   "DATA_TYPE" integer DEFAULT NULL,
   "DATABASE" integer DEFAULT NULL,
   "EVENT" integer DEFAULT NULL,
   "TV1_T1" real DEFAULT NULL,
   "TV1_T2" real DEFAULT NULL,
   "TV1_T3" real DEFAULT NULL,
   "TV1_V1" real DEFAULT NULL,
   "TV1_V2" real DEFAULT NULL,
   "TV1_V3" real DEFAULT NULL,
   "TV1_M1" real DEFAULT NULL,
   "TV1_M2" real DEFAULT NULL,
   "TV1_M3" real DEFAULT NULL,
   "TV1_P1" real DEFAULT NULL,
   "TV1_P2" real DEFAULT NULL,
   "TV1_Mg" real DEFAULT NULL,
   "TV1_QO" real DEFAULT NULL,
   "TV1_QG" real DEFAULT NULL,
   "TV1_DT" real DEFAULT NULL,
   "TX" real DEFAULT NULL,
   "TA" real DEFAULT NULL,
   "TV1_BHP" real DEFAULT NULL,
   "TV1_G1" real DEFAULT NULL,
   "TV1_G2" real DEFAULT NULL,
   "TV1_G3" real DEFAULT NULL,
   "TV2_T1" real DEFAULT NULL,
   "TV2_T2" real DEFAULT NULL,
   "TV2_T3" real DEFAULT NULL,
   "TV2_V1" real DEFAULT NULL,
   "TV2_V2" real DEFAULT NULL,
   "TV2_V3" real DEFAULT NULL,
   "TV2_M1" real DEFAULT NULL,
   "TV2_M2" real DEFAULT NULL,
   "TV2_M3" real DEFAULT NULL,
   "TV2_P1" real DEFAULT NULL,
   "TV2_P2" real DEFAULT NULL,
   "TV2_MG" real DEFAULT NULL,
   "TV2_QO" real DEFAULT NULL,
   "TV2_QG" real DEFAULT NULL,
   "TV2_DT" real DEFAULT NULL,
   "TV2_BHP" real DEFAULT NULL,
   "TV2_BOC" real DEFAULT NULL,
   "TV2_G1" real DEFAULT NULL,
   "TV2_G2" real DEFAULT NULL,
   "TV2_G3" real DEFAULT NULL,
   "EVENT1" real DEFAULT NULL,
   "EVENT2" real DEFAULT NULL,
   "EVENT_TIME1" real DEFAULT NULL,
   "EVENT_TIME2" real DEFAULT NULL,
   "DI" real DEFAULT NULL,
PRIMARY KEY (ID)
);

You can download the "database.mdb" atabase file from here.

2. Open the data export module's settings and enable writing to the database. Then switch to the "Connection" tab, click the "Configure" button, and create a connection to your database (figures 1 - 3).

Selecting a data export module
Figure 3.1

Writing data to a database
Figure 3.2

Database connection settings
Figure 3.3

3. Switch to the "Binding" tab, import the table structure from the database, and bind the parser variables to the respective columns (fields). Then delete all the unbound columns for which there is a default value in the table-creating script (figures 4 and 5).

Binding: variables and columns
Figure 3.4

Importing table structure
Figure 3.5

Logging data to a plain-text file

In addition to writing data to a database, our program can log all the collected and processed data to plain-text files. You can use such log files as backup copies or keep them for later analysis. Our program can automatically create a new log file every day, every week, or every month (figures 1 and 2).

Data output settings for VKT-7
Figure 4.1 Data output settings for VKT-7

Data output settings for VKT-7
Figure 4.2 Data output settings for VKT-7

OPC server

Our program has a built-in OPC DA2 server that allows you to retrieve and view the last-read current or accumulated values any time. The recommended OPC server settings are shown in figures 1 and 2.

Enabling the OPC server VKT-7
Figure 5.1 Enabling the OPC server VKT-7

VKT-7. An example of data received
Figure 5.2 VKT-7. An example of data received.

To make data viewing easier, you can use different tag groups for current data and accumulated data. To do it, you can specify a data grouping rule for the OPC server. In the example, the data are grouped by serial number and data type.

Data grouped by data type
Figure 5.3 Data grouped by data type

Related articles: