Forum Home › Forums › Understanding the Software › RapidGate
- This topic has 22 replies, 2 voices, and was last updated 6 months, 3 weeks ago by kcks66.
-
AuthorPosts
-
April 15, 2024 at 11:17 am #14402kcks66Participant
Hi Mikhail,
I finally managed to setup another PC with Rapid SCADA configuration exactly same with the target PC Rapid SCADA. I managed to login target PC via RapidGate. The next step is pls advice for which part I should configure?
https://ibb.co/L00KSv0
This Historical Data Transfer Option?https://ibb.co/GtXdzWb
This Achieve Replication Option?FYI, all channels from Target PC and RapidGate PC are configured exactly same Channel ID. Target PC was configured with Archives set at ModArcPostgreSql.
Thank you.
April 16, 2024 at 12:37 pm #14411MikhailModeratorHi,
Historical Data Transfer Options is needed when you can get historical data from your device, such as electricity meter. A driver should support reading historical data.
Achieve Replication Options allow to synchronize archives between 2 instances of Rapid SCADA. It can be done manually by a command or automatically. For unknown reason, Upload options are not displayed in your screenshot.
April 16, 2024 at 1:04 pm #14418kcks66ParticipantHi Mikhail,
For my case which I want to convert historical data from DAT format to store in PostgreSql database which option should I use?
What should I do to make the Upload options that no display in my RapidGate to reappear back?
April 17, 2024 at 5:07 am #14422kcks66ParticipantHi Mikhail,
I re-setup another PC with RapidGate module. The Upload options appear in this PC.
Pls advice for how should I configure to upload all historical data in DAT format from this PC to store in PostgreSql database at target PC?
Thank you.
April 17, 2024 at 9:01 am #14424MikhailModeratorHi,
Archive Replication Options are enabled. That’s correct.Do the following:
1. Create a new channel of the Output type. Set tag code to GateCmd and Format to String.
2. Set Command code of the gate to GateCmd
3. Create a table view that helps to send commands using that channel.Try sending command like
cmd=UploadArchive startDT=2022-07-01 10:00:00 endDT=2022-07-01 11:00:00
Watch for the Rapid Gate log files. You should see how data are uploading.
April 17, 2024 at 9:49 am #14428kcks66ParticipantHi Mikhail,
That’s great I can see historical data uploading status in the RapidGate log files. However, there is problem occur at the Target PC side:
Error message:
2024-04-17 17:48:23 Error writing to database:
Npgsql.PostgresException (0x80004005): 23514: no partition of relation “min_historical” found for rowDETAIL: Detail redacted as it may contain sensitive data. Specify ‘Include Error Detail’ in the connection string to include this information.
at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
at Scada.Server.Modules.ModArcPostgreSql.Logic.PointQueue.ProcessItems()
Exception data:
Severity: ERROR
SqlState: 23514
MessageText: no partition of relation “min_historical” found for row
Detail: Detail redacted as it may contain sensitive data. Specify ‘Include Error Detail’ in the connection string to include this information.
SchemaName: mod_arc_postgre_sql
TableName: min_historical
File: execPartition.c
Line: 335
Routine: ExecFindPartitionPls advice and thank you.
April 18, 2024 at 10:56 am #14434MikhailModeratorHi,
Note that Rapid Gate status is written in ModRapidGate*.* log files on the machine where Rapid Gate is running.April 18, 2024 at 11:00 am #14435MikhailModeratorThe cause of the error is that there is no partition for old data. You should create it manually using pgAdmin. SQL example:
CREATE TABLE mod_arc_postgre_sql.min_historical_20240101_20240201 PARTITION OF mod_arc_postgre_sql.min_historical FOR VALUES FROM ('2024-01-01 03:00:00+03') TO ('2024-02-01 03:00:00+03')
Set your own dates for the partitions. By default 1 partition covers 1 month.
April 18, 2024 at 11:01 am #14436MikhailModeratorUse the existing partitions as examples. pgAdmin can show their SQL.
April 18, 2024 at 2:02 pm #14440kcks66ParticipantHi Mikhail,
I manually create partition in pgAdmin as your advice. It’s worked.
Looks like my data is huge. It takes long hours to transfer few days data. I have data from 2020 to 2024 to transfer, I wonder how long will it takes to finish them.
April 18, 2024 at 2:06 pm #14441kcks66ParticipantHi Mikhail,
However, I found there is data lost after upload and convert into Postgresql data.
Below is data from DAT files before upload:
Below is data from PostgreSql after upload:
Pls advice for did I miss any steps or wrong setting?
Thank you.April 19, 2024 at 11:22 am #14443MikhailModeratorHi,
Check ModRapidGate_XXX.txt if there are skipped records in Historical Data section.April 19, 2024 at 11:30 am #14445kcks66ParticipantHi Mikhail,
I found many similar of this:
2024-04-18 16:28:18 Error transferring historical data:
System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..
—> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
— End of inner exception stack trace —
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Scada.Client.ClientBase.ReceiveResponse(DataPacket request)
at Scada.Client.ScadaClient.WriteChannelData(Int32 archiveMask, ICollection`1 slices, WriteDataFlags flags)
at e.j()April 19, 2024 at 1:55 pm #14449kcks66ParticipantHi Mikhail,
I checked all the Calculated Channels data were not uploaded into Target PC.
Below is data from DAT files before upload:
Below is data from PostgreSql after upload:
Is this normal?
Thank you.April 21, 2024 at 12:03 pm #14451kcks66ParticipantHi Mikhail,
After I several test and retest, I found out data lost is due to weak wifi signal from PC with RapidGate. I move the PC next to router and use LAN cable instead of wifi, problem solved.
As for why calculated channels always 0 is due to I enable the formula with 0. I disable the formula and problem solved.
Looks like the “converting DAT files to PostgreSql database” is success. Right now I just need to keep perform the uploading command and wait patiently until all done.
Thanks you for the support.
-
AuthorPosts
- You must be logged in to reply to this topic.