Sign In Help
Schneider Electric
HelpSign In
Schneider Electric Exchange
  • Home
  • Collaborate
  • Develop
  • Shop
Home Collaborate Develop Shop Log in or Register Help

Invite a Co-worker

Send a co-worker an invite to the Exchange 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
  • Home
  • Collaborate
  • Exchange Community
  • :
  • SCADA & Telemetry Solutions
  • :
  • Geo SCADA Expert Forum
  • :
  • How to call the ClearSCADA built in Time Average function?
Community Menu
  • Forums
    • By Topic
        • EcoStruxure IT
          • EcoStruxure IT forum
        • Industrial Automation
          • Industry Automation and Control Forum
          • Alliance System Integrators Forum
          • Machine Solutions in the Digital Transformation
          • EcoStruxure Automation Expert / IEC 61499 Forum
          • Industrial Edge Computing Forum
          • Level and Pressure Instrumentation Forum
          • Modicon User Group
          • PLC Club Indonesia
          • SEE Automation Club Forum
          • Fabrika ve Makina Otomasyonu Çözümleri
          • Форум по промышленной автоматизации СНГ
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Forum
          • SCADA and Telemetry Devices Forum
        • Power Distribution IEC
          • Power Distribution and Digital
          • Power Standards & Regulations
          • Paneelbouw & Energie Distributie
        • Power Distribution Softwares
          • EcoStruxure Power Design Forum
          • SEE Electrical Building+ Forum
          • LayoutFAST User Group Forum
        • Solutions for your Business
          • Solutions for Food & Beverage Forum
          • Solutions for Healthcare Forum
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Forum
        • Healthcare
          • Solutions for Healthcare Forum
      • EcoStruxure IT
        • EcoStruxure IT forum
      • Industrial Automation
        • Industry Automation and Control Forum
        • Alliance System Integrators Forum
        • Machine Solutions in the Digital Transformation
        • EcoStruxure Automation Expert / IEC 61499 Forum
        • Industrial Edge Computing Forum
        • Level and Pressure Instrumentation Forum
        • Modicon User Group
        • PLC Club Indonesia
        • SEE Automation Club Forum
        • Fabrika ve Makina Otomasyonu Çözümleri
        • Форум по промышленной автоматизации СНГ
      • SCADA & Telemetry Solutions
        • Geo SCADA Expert Forum
        • SCADA and Telemetry Devices Forum
      • Power Distribution IEC
        • Power Distribution and Digital
        • Power Standards & Regulations
        • Paneelbouw & Energie Distributie
      • Power Distribution Softwares
        • EcoStruxure Power Design Forum
        • SEE Electrical Building+ Forum
        • LayoutFAST User Group Forum
      • Solutions for your Business
        • Solutions for Food & Beverage Forum
        • Solutions for Healthcare Forum
      • Food & Beverage
        • Solutions for Food & Beverage Forum
      • Healthcare
        • Solutions for Healthcare Forum
  • Blogs
    • By Topic
        • Industrial Automation
          • Industrial Edge Computing Blog
          • Industry 4.0 Blog
          • Industrie du Futur France
        • SCADA & Telemetry Solutions
          • SCADA and Telemetry Blog
        • Power Distribution IEC
          • Power Events & Webinars
          • Power Foundations Blog
        • Power Distribution NEMA
          • NEMA Power Foundations Blog
        • Power Distribution Softwares
          • EcoStruxure Power Design Blog
          • SEE Electrical Building+ Blog
        • Solutions for your Business
          • Solutions for Food & Beverage Blog
          • Solutions for Healthcare Blog
          • Solutions for Retail Blog
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Blog
        • Healthcare
          • Solutions for Healthcare Blog
        • Retail
          • Solutions for Retail Blog
      • Industrial Automation
        • Industrial Edge Computing Blog
        • Industry 4.0 Blog
        • Industrie du Futur France
      • SCADA & Telemetry Solutions
        • SCADA and Telemetry Blog
      • Power Distribution IEC
        • Power Events & Webinars
        • Power Foundations Blog
      • Power Distribution NEMA
        • NEMA Power Foundations Blog
      • Power Distribution Softwares
        • EcoStruxure Power Design Blog
        • SEE Electrical Building+ Blog
      • Solutions for your Business
        • Solutions for Food & Beverage Blog
        • Solutions for Healthcare Blog
        • Solutions for Retail Blog
      • Food & Beverage
        • Solutions for Food & Beverage Blog
      • Healthcare
        • Solutions for Healthcare Blog
      • Retail
        • Solutions for Retail Blog
  • Ideas
        • Industrial Automation
          • Modicon Ideas & new features
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Ideas
          • SCADA and Telemetry Devices Ideas
  • Knowledge Center
    • Building Automation Knowledge Base
    • Industrial Automation How-to videos
    • Ask Exchange
    • Digital E-books
    • Success Stories Corner
    • Power Talks
  • Events & Webinars
  • Support
    • User Guide
    • Leaderboard
    • Releases Notes
How can we help?
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: 
49234members
Join Now
242449posts
Join Now

How to call the ClearSCADA built in Time Average function?

Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Solved Go to Solution
Back to Geo SCADA Expert Forum
Solved
Kan
Ensign Kan
Ensign
‎2020-07-05 09:17 PM
0 Likes
3
458
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-07-05 09:17 PM

How to call the ClearSCADA built in Time Average function?

Is it possible to call the ClearSCADA Time Average function from a .NET application using the client library? Any example code will be much appreciated.

 

Thanks a lot.

Solved! Go to Solution.

Labels
  • SCADA
Tags (1)
  • Tags:
  • english
Share
Reply

Accepted Solutions
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-07-06 10:55 PM
0 Likes
2
441
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-07-06 10:55 PM

Re: How to call the ClearSCADA built in Time Average function?

Yes, it's possible.

 

From the .NET API you can InvokeMethods, you just need to know the name of the Method that you want to call, and what aggregate it is on, and what arguments to provide to it.

Pretty much all of these can be found in the DB Schema.

So I would start there.

 

If you're on your local GeoSCADA Expert server you can probably just go here:

https://localhost/schema/CHistoryBase

 

And that should show you the methods available.  You can see 'ProcessedValue' which will return 'a single processed historic value', which sounds like what a Time Average would be.

Then if you look at the argument for it, it wants:

  • StartTime (Time)... should be easy
  • EndTime (Time)... should be easy
  • Aggregate (Long)... you probably need to find out what number is associated with the aggregate you want.. I forget where this was found, I think it's in the help somewhere, or tprojects
  • Reason (String).. to filter the values if needed

It will return a variant representing the processed value.


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..

See Answer In Context

Tags (1)
  • Tags:
  • english
Share
Reply
sbeadle
Sisko sbeadle Sisko
Sisko
‎2020-07-07 02:19 AM
0 Likes
1
434
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-07-07 02:19 AM

Re: How to call the ClearSCADA built in Time Average function?

Here's some sample code to do that - comments do some of the explaining:

                // Retrieve the last day's data 
                DateTime startTime = DateTime.UtcNow.Subtract(TimeSpan.FromDays(1));
                DateTime endTime = DateTime.UtcNow;

                // Retrieve an average of the last day's values - Processed Data
                // Historic Aggregate code 3 = average of values. Search help for "Animations for Historic Data" for codes.
                object[] pParams = new object[4] { startTime, endTime, 3, "" };
                object value = (object)myPoint.InvokeMethod("Historic.ProcessedValue", pParams);
                Console.WriteLine("Processed Average Value: " + value.ToString());

See Answer In Context

Tags (1)
  • Tags:
  • english
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
3 Replies 3
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-07-06 10:55 PM
0 Likes
2
442
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-07-06 10:55 PM

Re: How to call the ClearSCADA built in Time Average function?

Yes, it's possible.

 

From the .NET API you can InvokeMethods, you just need to know the name of the Method that you want to call, and what aggregate it is on, and what arguments to provide to it.

Pretty much all of these can be found in the DB Schema.

So I would start there.

 

If you're on your local GeoSCADA Expert server you can probably just go here:

https://localhost/schema/CHistoryBase

 

And that should show you the methods available.  You can see 'ProcessedValue' which will return 'a single processed historic value', which sounds like what a Time Average would be.

Then if you look at the argument for it, it wants:

  • StartTime (Time)... should be easy
  • EndTime (Time)... should be easy
  • Aggregate (Long)... you probably need to find out what number is associated with the aggregate you want.. I forget where this was found, I think it's in the help somewhere, or tprojects
  • Reason (String).. to filter the values if needed

It will return a variant representing the processed value.


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..

See Answer In Context

Tags (1)
  • Tags:
  • english
Share
Reply
sbeadle
Sisko sbeadle Sisko
Sisko
‎2020-07-07 02:19 AM
0 Likes
1
435
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-07-07 02:19 AM

Re: How to call the ClearSCADA built in Time Average function?

Here's some sample code to do that - comments do some of the explaining:

                // Retrieve the last day's data 
                DateTime startTime = DateTime.UtcNow.Subtract(TimeSpan.FromDays(1));
                DateTime endTime = DateTime.UtcNow;

                // Retrieve an average of the last day's values - Processed Data
                // Historic Aggregate code 3 = average of values. Search help for "Animations for Historic Data" for codes.
                object[] pParams = new object[4] { startTime, endTime, 3, "" };
                object value = (object)myPoint.InvokeMethod("Historic.ProcessedValue", pParams);
                Console.WriteLine("Processed Average Value: " + value.ToString());

See Answer In Context

Tags (1)
  • Tags:
  • english
Share
Reply
Kan
Ensign Kan
Ensign
‎2020-07-07 10:00 PM
0 Likes
0
413
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-07-07 10:00 PM

Re: How to call the ClearSCADA built in Time Average function?

Time Average = 30

StdDev = 5

 

Thanks a lot for your help!

Tags (1)
  • Tags:
  • english
Share
Reply
Top Experts
User Count
BevanWeiss
Admiral BevanWeiss
2
sbeadle
Sisko sbeadle Sisko
1
geoffpatton
Lieutenant geoffpatton
1
See More Top Experts
Find a Service Provider
Find a certified partner to help you address your integration, installation, maintenance and project needs.
View all Providers
Support

Have a question? Please contact us with details, and we will respond.

Contact Us
FAQ

Look through existing questions to find popular answers.

Learn More
About

Want to know more about Exchange and its possibilities?

Learn More

Full access is just steps away!

Join Exchange for FREE and get unlimited access to our global community of experts.

Connect with Peers & Experts

Discuss challenges in energy and automation with 30,000+ experts and peers.

Get Support in Our Knowledge Base

Find answers in 10,000+ support articles to help solve your product and business challenges.

Ask Questions. Give Solutions

Find peer based solutions to your questions. Provide answers for fellow community members!

Register today for FREE

Register Now

Already have an account?Log in

About Us FAQ Terms & Conditions Privacy Notice Change your cookie settings
©2020, Schneider Electric