Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

Importing Historic Data to points in GeoSCADA: LoadDataValue( Reason, Quality, Time Stamp, Value ) Error

EcoStruxure Geo SCADA Expert Forum

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • Importing Historic Data to points in GeoSCADA: LoadDataValue( Reason, Quality, Time Stamp, Value ) Error
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
sbeadle
Kirk sbeadle Kirk
309
AndrewScott
Admiral AndrewScott
99
BevanWeiss
Spock BevanWeiss
91
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
38
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to EcoStruxure Geo SCADA Expert Forum
Solved
Anonymous user
Not applicable

Posted: ‎2020-03-05 11:37 PM . Last Modified: ‎2023-05-03 12:16 AM

0 Likes
25
9731
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-05 11:37 PM . Last Modified: ‎2023-05-03 12:16 AM

Importing Historic Data to points in GeoSCADA: LoadDataValue( Reason, Quality, Time Stamp, Value ) Error

I am using the Automation Interface with VB.NET and I am getting an error when trying to use the method LoadDataValue( Reason, Quality, Time Stamp, Value ) . I have managed to use the same method with Python (works perfectly).

 

Error: 

 

System.MissingMemberException:'Public member 'LoadDataValue' on type '_ComObject not found.'

 

Here is my code:

 

Dim Svr As ScxV6DbClient.ScxV6Server

Dim Obj As ScxV6DbClient.ScxV6Object

Dim his As ScxV6DbClient.ScxV6Aggregate

Svr.Connect(" ", " ", " ")

 

Obj=Svr.FindObject("Example Projects. New Analog Point")

his = Obj.Aggregate("Historic")

his.Enable =True                           'This Works - Enable/ Disables the historic for the point

his.Interface.LoadDataValue(1,192,"02/01/2020 10:09:05.200",1) 'Shows the above error

  • Tags:
  • aggregate
  • Automation Interface
  • Historic
  • VB
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-11 07:11 AM

In response to sbeadle
0 Likes
2
9599
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-11 07:11 AM

Going to mark this as answered. We're pretty sure there is some windows/setup issue going on as it's working for others. Please try this on a fresh PC if you can.

See Answer In Context

Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 25
sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-06 03:44 AM

0 Likes
2
9725
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-06 03:44 AM

Hi. You will need to use a time data type, not a string.

 

Reply

Link copied. Please paste this link to share this article on your social media post.

Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-03-06 06:28 AM

0 Likes
21
9717
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-06 06:28 AM

From the examples in the Help  I would say make sure you have Svr.Connect("ServerName", "AccountName", "AccounPassword") and his.Interface.LoadDataValue("1",192,"02/01/2020 10:09:05",1). Your was missing " " around the first value after the ( 

Reply

Link copied. Please paste this link to share this article on your social media post.

AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2020-03-06 06:37 AM . Last Modified: ‎2020-03-06 06:39 AM

In response to Hardin4019
0 Likes
20
9714
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-06 06:37 AM . Last Modified: ‎2020-03-06 06:39 AM

The help contained some errors that were only corrected fairly recently. This included incorrect use of double quotes.

 

Below is the VB.NET example from the latest help:

 

 

Dim objServer = New ScxV6Server
objServer.Connect ("system name", "username", "pwd")
Dim obj = objServer.FindObject("Array Group.AG01")
Dim His = obj.Aggregate("Historic")
His.Interface.LoadDataValue(1, 192, #7/3/2016 5:22:23 PM#, 13)
 
obj = Nothing
objServer.Disconnect()

 

 


Andrew Scott, R&D Principal Technologist, AVEVA
Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-08 05:55 PM

In response to AndrewScott
0 Likes
19
9687
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-08 05:55 PM

It is giving me the same error.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-08 06:17 PM

In response to sbeadle
0 Likes
1
9686
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-08 06:17 PM

I tried putting in a timestamp variable as well. But it is giving the same error as 'LoadDataValue' on type '_ComObject' not found. Is there another reference I should try adding to the solution? Or is there a specific time stamp format? 

 

Dim tryDateTime As Date

 

tryDateTime = #01/01/2020 10:14 PM#

 

his.Interface.LoadDataValue(1, 192, tryDateTime, 1)

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-08 08:55 PM

In response to Anonymous user
0 Likes
0
9682
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-08 08:55 PM

When I look at the definition for "Interface", it shows it as a "Read Only" Object Property. The possible methods under the Property are : Equals, GetHashCode, GetType, ToString. 

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-09 01:54 AM

In response to Anonymous user
0 Likes
18
9673
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-09 01:54 AM

This case has been raised with support, but I wanted to put it here as well since many guys here have more experience with the APIs than I do!

 

This works for me:

 

        Dim Svr As ScxV6DbClient.ScxV6Server
        Dim Obj As ScxV6DbClient.ScxV6Object
        Dim his As ScxV6DbClient.ScxV6Aggregate

        Svr = New ScxV6DbClient.ScxV6Server                                                  'Additional line, create the server object
        Svr.Connect("Scratch", "", "")                                                                    'I assume you have working logon details
        Obj = Svr.FindObject("Example Projects.New Analog Point")

        his = Obj.Aggregate("Historic")
        his.Enable = True                                                                                        'This Works - Enable/ Disables the historic for the point
        his.Interface.LoadDataValue(1, 192, #02/01/2020 10:09:05 #, 1)              'Shows the above error

        Obj = Nothing                                                                                             'Unrelated but good practice
        Svr.Disconnect()

 

Only two real differences:
I've added a line to create the server object. I wouldn't have thought connect would work without! It should throw a Null Reference Exception.
I've removed a space from in front of the point's name - the leading space is not allowed config so I guess it is incorrect - but again this is strange, I wouldn't have thought the aggregate would work!


The exception you're throwing kinda makes me think you don't have the correct reference added to your project. It should be Scx V6 Automation Interface as a COM reference:

 

Capture.JPG

 

 

Reply

Link copied. Please paste this link to share this article on your social media post.

AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2020-03-09 04:02 AM

In response to Anonymous user
1 Like
17
9670
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-09 04:02 AM

This might be a registration issue with DBClient.dll.

 

You might try re-registering the DLL from an Administrator command prompt:

64-bit

regsvr32 "C:\Program Files\Schneider Electric\ClearSCADA\DBClient.dll"

32-bit

regsvr32 "C:\Program Files (x86)\Schneider Electric\ClearSCADA\DBClient.dll"

 


Andrew Scott, R&D Principal Technologist, AVEVA
Reply

Link copied. Please paste this link to share this article on your social media post.

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-09 09:18 AM

In response to AndrewScott
1 Like
16
9665
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-09 09:18 AM

Another possible source of the problem is that this method can only be used to import data into the writable part of a point's history. Look at the Server Configuration tool, there are two relevant dates in the 'Historic Configuration' | 'Historic Data' page.

 

a) Data cannot be newer than the Future Data window.

b) Data cannot be older than the Archive After window.

In this example, data should be newer than 25 weeks old and older than 1 week into the future:

 

Annotation 2020-03-09 161703.jpg

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-09 10:38 PM

In response to sbeadle
0 Likes
15
9630
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-09 10:38 PM

@sbeadle I have faced that issue before with my Python script as well. I rechecked that, and the time is in the range.

@AndrewScott  I registered the dll with success. But I am still receiving that error.

@Anonymous user I have the "Scx V6 Automation Interface" Reference attached. And my bad for forgetting to copy the script correctly. I have created the server object in it. I am able to connect to the server and FindObject/ Write to Opc properties and Enable the Historic Aggregate. But not able to  use "LoadDataValue()" I am not able to use any methods of the Interface property specifically. 

 

Thank you all for trying to help.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-09 10:46 PM

In response to Anonymous user
0 Likes
14
9627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-09 10:46 PM

If you browse to ScxV6ObjectClass, does it look like this or are there things missing?

 

Browse.JPG

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-09 11:13 PM

In response to Anonymous user
0 Likes
0
9625
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-09 11:13 PM

Yes it looks exactly like that.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-10 12:07 AM

In response to Anonymous user
0 Likes
12
9624
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-10 12:07 AM

I checked the definition of Interface: And this is what it shows. Capture.JPG

Reply

Link copied. Please paste this link to share this article on your social media post.

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-10 12:39 AM

In response to Anonymous user
0 Likes
11
9621
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-10 12:39 AM

In your original post you mention that Python works for you. Please can you post your Python code here - there may be a clue in it? Thanks.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-10 01:01 AM

In response to sbeadle
0 Likes
10
9619
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-10 01:01 AM

import win32com.client

server=win32com.client.Dispatch('Serck.ScxV6Server')

server.Connect(' ',' ',' ')

 

AnalogObj=server.FindObject('Example Projects.Analog Point')

AnalogObj.Interface.Historic.LoadDataValue(1, 192, #01/02/2020 10:10:10#, 1)

 

(I am not able to use the interface property at all.

I am using Visual Studio Community 2019, should I try a different version?)

Reply

Link copied. Please paste this link to share this article on your social media post.

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-10 08:11 AM

In response to Anonymous user
1 Like
9
9611
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-10 08:11 AM

While the community considers that, here's how to do it with the .Net API:

using System;
using ClearScada.Client;            // This requires a Reference from the project to this dll
using System.Security;

namespace InsertHistoricData
{
	class Program
	{
		static void Main()
		{
			string user = "s";
			string pass = "s";

			ClearScada.Client.Simple.Connection connection;
			var node = new ClearScada.Client.ServerNode(ClearScada.Client.ConnectionType.Standard, "127.0.0.1", 5481);
			connection = new ClearScada.Client.Simple.Connection("Utility");
			connection.Connect(node);
			var spassword = new System.Security.SecureString();
			foreach (var c in pass)  spassword.AppendChar(c); 
			connection.LogOn(user, spassword);
			ClearScada.Client.Simple.DBObject PointObj = connection.GetObject("Test His Insert and Load.New Analog Point");

			Object[] p1 = new Object[4];
			p1[0] = 1;
			p1[1] = 192;
			p1[2] = DateTime.UtcNow;
			p1[3] = 1;
			PointObj.Aggregates["Historic"].InvokeMethod("LoadDataValue", p1);
		}
	}
}
Reply

Link copied. Please paste this link to share this article on your social media post.

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-11 07:11 AM

In response to sbeadle
0 Likes
2
9600
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-11 07:11 AM

Going to mark this as answered. We're pretty sure there is some windows/setup issue going on as it's working for others. Please try this on a fresh PC if you can.

Reply

Link copied. Please paste this link to share this article on your social media post.

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-11 07:13 AM

In response to sbeadle
0 Likes
1
9597
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-11 07:13 AM

For completeness, a complete C# code tested and working:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ScxV6DbClient; // Refer to program files (x86)\===\ClearScada.Client.dll

namespace InsertHistoryCOMAPI
{
	class Program
	{
		static void Main(string[] args)
		{
			ScxV6Server objServer = new ScxV6Server();
			objServer.Connect("Local", "s", "s");
			ScxV6Object obj = objServer.FindObject("Example Projects.New Analog Point");
			ScxV6Aggregate His = obj.Aggregate["Historic"];
			His.Interface.LoadDataValue(1, 192, DateTime.UtcNow, 13);
			obj = null;
			objServer.Disconnect();
		}
	}
}
Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2020-03-11 09:11 PM

In response to sbeadle
0 Likes
0
9583
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-03-11 09:11 PM

I think it is some configuration to be done. I tried on a different computer, it gave the same error. Thank you for your help. I will try the .Net API for the purpose. 

Reply

Link copied. Please paste this link to share this article on your social media post.

Kan
Ensign Kan
Ensign

Posted: ‎2020-07-27 09:23 PM

In response to sbeadle
0 Likes
5
8036
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-07-27 09:23 PM

I have a question related to the code.

 

The following is my function and it works. But the issue is if the function is called multiple times with the same datetime value, then it inserts duplicated records in the historic list of the point.

 

For example, the list looks like this after the function is called 3 times with the same datetime value but different values.

 

Time                                             Value

25/05/2020 3:00:00.000 AM         3.123

25/05/2020 3:00:00.000 AM         4.866

25/05/2020 3:00:00.000 AM         3.332

 

What I want is the historic list only contain the value set from the latest call. How to remove the duplicates and only store the latest value? Thanks a lot.

 

public bool WriteValueToAnalogPoint(string pointFullName, DateTime valueDateTime, double value)

 

{

if (!IsConnected)

 

{

throw new Exception("No connection.");

 

}

try

 

{

DBObject destination = this.connection.GetObject(pointFullName);

Object[] args = new Object[4];

 

args[0] = 1;

args[1] = QUALITY_GOOD;

args[2] = valueDateTime;

args[3] = value;

destination.Aggregates[HISTORIC].InvokeMethod(FUNC_LOAD_DATA_VALUE, args);

return true;

 

}

catch(Exception ex)

 

{

//todo: log the error

return false;

 

}

}

 

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2020-07-27 09:43 PM

In response to Kan
0 Likes
4
8031
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-07-27 09:43 PM

Yes, that will create duplicate values with the same timestamp, even if the value changes. The method call is deliberately dumb as its about efficiency and you use those method calls to import many hundred of gigabytes of data.

 

A few ways I can think of:

 

1. If you know all the data that should be in that historic for the point (either by pre-reading it from CDBHistoric or your original data source has it) the easiest way my be to disable historic and then re-enable historic on that point and the historic will be blank giving you a clean slate. But this is a bit like a sledgehammer to a nut and with hot-standby, low bandwidth links and more complex architectures does have some possible crazy knock-on effects. If in an instance need to ensure property overrides are set. You're also not able to write into the read-only/archive period but that's the same for the next one too anyway.

 

2. Be surgical and read the existing data, and where existing data matches the timestamp for your new data use the delete method (new since 2017R3 I think?) to remove the old data first so when you import there will be only the values you want in its place. I'd go for this one personally but each to their own.

 

Both have timing issues and the need to backup things in case of failure. Test though!

 

Probably can't use modify value, as I think that causes a second entry to be there. Also you can't do the historic optimising methods as their values differ they aren't actually duplicates so they won't be cleaned up.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Kan
Ensign Kan
Ensign

Posted: ‎2020-07-27 10:34 PM

In response to AdamWoodland
0 Likes
2
8025
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-07-27 10:34 PM

Thanks a lot for your reply.

 

Yes, I agree the best way for me is to delete the record before adding. Do you know how to call the delete function (the syntax and what sort of parameters). I can't find any help or reference on that function. I am new to ClearSCADA.

 

Thanks a lot.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2020-07-28 02:10 AM

In response to Kan
0 Likes
1
8017
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-07-28 02:10 AM

There are two methods for deleting historic data:

 

DeleteValue( Time, HistoricSourceType, Comment )

DeleteValues( StartTime, EndTime, HistoricSourceType, Comment )

 

The first method deletes a single record, the second method deletes all of the records in a time period.

 

The HistoricSourceType (integer) argument defines what type of data is removed:

  1. Raw data
  2. Modified data
  3. Both (raw and modified)

 

The Comment (string) argument provides a description of why the record(s) is being deleted and is included in the event journal message that logs the deletion.

 

Both methods require 'system administrator' permission.


Andrew Scott, R&D Principal Technologist, AVEVA
  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Kan
Ensign Kan
Ensign

Posted: ‎2020-07-28 04:35 PM

In response to AndrewScott
0 Likes
0
8010
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-07-28 04:35 PM

Thanks heaps! Very helpful.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-07-29 06:12 PM

In response to AdamWoodland
0 Likes
0
8001
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-07-29 06:12 PM

It sounds like the right option for the problem directly presented would have been the ModifyValue method.

 

ModifyValue Modify Value Modifies a single historic value. Modify History 1.Timestamp (Time) : Timestamp of modified historic value.
2.Value (Variant) : Modified historic value.
3.Quality (Long) : Quality of modified historic value.
4.Comment (String) : Comment to be logged against the value modification in the event journal.

 

I would not expect it to add another equivalent historical record (and if it does, I would consider that a 'bug' since then Modify essentially performs exactly the same function as Insert).

 

 

Another approach might be to collect or coalesce the values internally before you actually report them to Geo SCADA.

If you have all of your calculated values, and then sort them by timestamp, you would know which are duplicates.. and could apply some logic (in your code) to only retain the value that you care about... which might be the most recently generated (in which case you'd need to track when you generated the timestamp), or the average, or the min/max/stddev or some other such aggregate.  Then you write one batch of values into the Historic stream, which would deliberately not have any duplicates.

 

If your records might come from a source where they have timestamps reported from 'all over' (i.e. you might get a record timestamped 2020-01-01 00:00:00 today... and another timestamped the same in a week's time) then my second approach wouldn't work.  But if you can assume they are infrequent, then you could do a pre-pass to identify duplicate records from your new batch (i.e. those that exist already in the historical archive) and treat them a little specially.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of