Forum Home › Forums › Understanding the Software › ModDBExport issue
- This topic has 8 replies, 2 voices, and was last updated 7 years ago by Mikhail.
-
AuthorPosts
-
April 9, 2017 at 8:57 am #2083zzParticipant
Dear All,
I thinkg in ExportDBexport module not works correctly
at now I haveExport Data Module
——————
State: normalData 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/0file
ModDBExport.log is empty, only confirm that module start.in mssql nothing appear.
all of this is when I enable export archive datacode
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 ?
April 9, 2017 at 5:46 pm #2084MikhailModeratorHello,
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.
April 9, 2017 at 5:48 pm #2085MikhailModeratorYou 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.
April 9, 2017 at 6:03 pm #2087zzParticipantHello 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 1Can you propose SQL script to resolve my problem ?
April 10, 2017 at 5:31 am #2088MikhailModeratorHello,
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.
April 12, 2017 at 10:19 am #2094zzParticipantHello
settings are:
time: 00:00:00
period: 00:00:05
timeout 1000
delay 200there is only one modbus address,
April 12, 2017 at 12:06 pm #2095MikhailModeratorPlease 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
April 12, 2017 at 1:04 pm #2096zzParticipant2017-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.6000000SCADA-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 successfulActive Communication Lines
————————–
1. Line 7 “ModbusRTU-TCP4001” : runningApril 12, 2017 at 2:40 pm #2097MikhailModeratorYou forget a log file. It’s name is lineXXX.log
-
AuthorPosts
- You must be logged in to reply to this topic.