ModDBExport issue

Forum Home Forums Understanding the Software ModDBExport issue

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2083
    zz
    Participant

    Dear All,

    I thinkg in ExportDBexport module not works correctly
    at now I have

    Export Data Module
    ——————
    State: normal

    Data Sources
    ————
    1. MSSQL – 172.24.33.222; state: normal; in queue cur/arc/ev: 13/0/0; exported cur/arc/ev: 0/0/0; skipped cur/arc/ev: 0/0/0

    file
    ModDBExport.log is empty, only confirm that module start.

    in mssql nothing appear.
    all of this is when I enable export archive data

    code
    MERGE CnlData AS target
    USING (SELECT @dateTime, @cnlNum) AS source (DateTime, CnlNum)
    ON (target.DateTime = source.DateTime AND target.CnlNum = source.CnlNum)
    WHEN MATCHED THEN
    UPDATE SET Val = @val, Stat = @stat
    WHEN NOT MATCHED THEN
    INSERT (DateTime, CnlNum, Val, Stat)
    VALUES (@dateTime, @cnlNum, @val, @stat);

    when i uncheck export and check current data with code
    INSERT INTO CnlData (DateTime, CnlNum, Val, Stat)
    VALUES (@dateTime, @cnlNum, @val, @stat)

    data appears, but too often (duplicated data in nthe same time – different in tie jest in milisecond)

    Can someone help me with that ?

    #2084
    Mikhail
    Moderator

    Hello,

    SQL script for export archive data is executed very rare, in special cases when a driver of Communicator implements this feature.

    SQL script for current data is executed for each value of input channel (tag) that is sent from Communicator to Server.

    #2085
    Mikhail
    Moderator

    You can decrease polling speed of Communicator by increasing delay after requests.
    Or may be change SQL for export current data to fit your needs.

    • This reply was modified 7 years ago by Mikhail.
    #2087
    zz
    Participant

    Hello Mikhail,

    I use modbus RTU via TCP,it works correclty and I see correct data
    I would like to export only values that are read every 1 minute but see them online every 5 seconds as currect value.

    Also I see in database double data on same time, only miliseconds between writes to database. This is very strange behaviour, because I dont know what is the trigger to write to database doubled data in same time

    4 2017-04-09 19:59:34.1600000 705 3265996 1
    5 2017-04-09 19:59:34.1600000 704 510,493438720703 1
    6 2017-04-09 19:59:34.1600000 703 107,399993896484 1
    7 2017-04-09 19:59:34.1600000 702 24,3499984741211 1
    8 2017-04-09 19:59:34.1600000 701 16 1
    9 2017-04-09 19:59:34.1370000 705 3265996 1
    10 2017-04-09 19:59:34.1370000 704 510,493438720703 1
    11 2017-04-09 19:59:34.1370000 703 107,399993896484 1
    12 2017-04-09 19:59:34.1370000 702 24,3499984741211 1
    13 2017-04-09 19:59:34.1370000 701 16 1

    Can you propose SQL script to resolve my problem ?

    #2088
    Mikhail
    Moderator

    Hello,

    I agree, it is strange that time stamps are so close to each other. How many polling cycles are performed by Communicator per second? Do they stay close in long time interval?

    We can develop SQL scripts according to your custom requirements on a commercial basis.

    #2094
    zz
    Participant

    Hello

    settings are:

    time: 00:00:00
    period: 00:00:05
    timeout 1000
    delay 200

    there is only one modbus address,

    #2095
    Mikhail
    Moderator

    Please provide communication line log (C:\SCADA\ScadaComm\Log) and the result of the following SQL request:

    select distinct datetime from cnldata order by datetime desc
    
    #2096
    zz
    Participant

    2017-04-12 14:18:01.1970000
    2017-04-12 14:17:40.5530000
    2017-04-12 14:17:30.6030000
    2017-04-12 14:17:30.5930000
    2017-04-12 14:17:30.5800000
    2017-04-12 14:17:30.5700000
    2017-04-12 14:17:01.2230000
    2017-04-12 14:16:30.4770000
    2017-04-12 14:16:30.4670000
    2017-04-12 14:16:30.4430000
    2017-04-12 14:16:30.4330000
    2017-04-12 14:16:01.5600000
    2017-04-12 14:16:01.0530000
    2017-04-12 14:15:30.3300000
    2017-04-12 14:15:30.3200000
    2017-04-12 14:15:30.3100000
    2017-04-12 14:15:30.3000000
    2017-04-12 14:15:01.2300000
    2017-04-12 14:14:30.3300000
    2017-04-12 14:14:30.3200000
    2017-04-12 14:14:30.0830000
    2017-04-12 14:14:30.0730000
    2017-04-12 14:14:20.5570000
    2017-04-12 14:14:01.1970000
    2017-04-12 14:13:29.9030000
    2017-04-12 14:13:29.8900000
    2017-04-12 14:13:29.8800000
    2017-04-12 14:13:29.8700000
    2017-04-12 14:13:01.0130000
    2017-04-12 14:12:40.5600000
    2017-04-12 14:12:29.7670000
    2017-04-12 14:12:29.7530000
    2017-04-12 14:12:29.7430000
    2017-04-12 14:12:29.7330000
    2017-04-12 14:12:01.2000000
    2017-04-12 14:11:29.6300000
    2017-04-12 14:11:29.6170000
    2017-04-12 14:11:29.6070000
    2017-04-12 14:11:29.5970000
    2017-04-12 14:11:01.5600000
    2017-04-12 14:11:01.0970000
    2017-04-12 14:10:29.4830000
    2017-04-12 14:10:29.4730000
    2017-04-12 14:10:29.4600000
    2017-04-12 14:10:29.4500000
    2017-04-12 14:10:01.2300000
    2017-04-12 14:09:29.2930000
    2017-04-12 14:09:29.2830000
    2017-04-12 14:09:29.2700000
    2017-04-12 14:09:29.2600000
    2017-04-12 14:09:01.2230000
    2017-04-12 14:08:55.5530000
    2017-04-12 14:08:29.0970000
    2017-04-12 14:08:29.0870000
    2017-04-12 14:08:29.0770000
    2017-04-12 14:08:29.0670000
    2017-04-12 14:08:01.2230000
    2017-04-12 14:07:28.9600000
    2017-04-12 14:07:28.9500000
    2017-04-12 14:07:28.9400000
    2017-04-12 14:07:28.9270000
    2017-04-12 14:07:01.2230000
    2017-04-12 14:06:50.6000000

    SCADA-Communicator
    ——————
    Started : 10/04/2017 16:42:49
    Execution time : 1.22:19:55
    Version : 5.0.0.1
    SCADA-Server : version 5.0, authentication is successful

    Active Communication Lines
    ————————–
    1. Line 7 “ModbusRTU-TCP4001” : running

    #2097
    Mikhail
    Moderator

    You forget a log file. It’s name is lineXXX.log

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.