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
  • :
  • Re: Enabling/Disabling Historic logging using ST
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
        • Community experts & publishers
          • Publishers Community
    • 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
      • Community experts & publishers
        • Publishers Community
      • 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
Join Now
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: 
49723members
Join Now
243177posts
Join Now

Enabling/Disabling Historic logging using ST

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
Back to Geo SCADA Expert Forum
EugeneB1
Crewman EugeneB1
Crewman
‎2020-11-24 12:22 PM
0 Likes
5
301
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-24 12:22 PM

Enabling/Disabling Historic logging using ST

Hi 

 

I am trying to control the Historic Logging on tags in CS. For most points I can simply use the OPC point

 

..Point.HistoricLogging

 

However for points like a Trend point I can't do this as its an 'Aggregate' . I have managed to do it to using a script on a mimic but want to call this from an ST program.

 

 


'Enable Trend tags Historic logging
Sub EnableTrendTagHistoricLogging()


Set ObjPoint = Server.FindObject(Server.ThisObject.Parent.FullName + ".RV_FT01_RawPulses")
ObjPoint.Interface.Historic=True

End Sub

'Disable Trend tags Historic logging
Sub DisableTrendTagHistoricLogging()


Set ObjPoint = Server.FindObject(Server.ThisObject.Parent.FullName + ".RV_FT01_RawPulses")
ObjPoint.Interface.Historic=False

End Sub

 

How can I do this?

 

Labels
  • Logic
  • Scripting
Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
5 Replies 5
AdamWoodland
Lt. Commander AdamWoodland Lt. Commander
Lt. Commander
‎2020-11-24 02:56 PM
0 Likes
4
295
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-24 02:56 PM

Re: Enabling/Disabling Historic logging using ST

You should be able to use Point.Historic.$Enable or Enable$ (I can't remember off the top of my head) as type bool.

 

The problem you'll come across is referencing the properties on the aggregate as they don't existing until the aggregate is enabled. So you can't reference them in the logic if the aggregate is currently disabled and you want to enable it as the logic will bomb out with an error. The other way around the logic will run once to allow you to disable the aggregate but subsequent runs the logic will fail.

 

If you do want to edit the settings on the aggregate beyond enabling it, you'll have to do something tricky and split the function to different logic programs and only call the second logic program once you enable the aggregate. Still becomes a little tricky when the default state is disabled historic as the logic can't be compiled.

 

Have a play and see what works best for your setup.

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-11-24 11:38 PM
0 Likes
1
279
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-24 11:38 PM

Re: Enabling/Disabling Historic logging using ST

One way to do the Aggregate property update in ST Logic is to use an SQL execution with an UPDATE clause.

It's definitely not the nicest... but it's "robust" against the Aggregate not existing, since then the UPDATE still executes, but there's no WHERE match, so it just doesn't do the UPDATE.

 

Obviously the performance of this is not as good as having a specific reference to the Aggregate property precisely, but it should only ever be a very occasional thing anyway.


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 (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
EugeneB1
Crewman EugeneB1
Crewman
‎2020-11-25 10:45 AM
0 Likes
0
267
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-25 10:45 AM

Re: Enabling/Disabling Historic logging using ST

We use a PLC pump control systems and RTUs which can be configured remotely via an HMI, CS gets the updated config of what is used onsite so Its not something that I'll be doing often, pretty much initial setup and odd change.. There's quite a few of them in the field though!

 

I'll have a look at the SQL, but I assume I will need to find the tables from the schema and join them etc?

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
EugeneB1
Crewman EugeneB1
Crewman
‎2020-11-25 10:47 AM
0 Likes
1
266
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-25 10:47 AM

Re: Enabling/Disabling Historic logging using ST

Hi Adam

 

I tried the $enable, which compiled but nothing seemed to happen the enable$ didn't compile... I am wondering if the SQL method would be better as they won't change often?

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-11-25 07:14 PM
0 Likes
0
261
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-25 07:14 PM

Re: Enabling/Disabling Historic logging using ST

It's a little tricky still...

 

So with your Logic you can use something like

 

PROGRAM HistoricEnableProgram

  VAR_INPUT

    Enable : BOOL;

  END_VAR

 

  VAR

    HistoricEnabled AT %M(PointPath.Historic.$Enabled) : BOOL;

  VAR_END

 

  HIstoricEnabled := Enable;

END_PROGRAM

 

That will let you Enable / Disable the Historic Aggregate.

This is then where the ST SQL comes in... if you want to change things on the Historic Aggregate, you can't just reference the OPC property, since when the Aggregate is disabled, the OPC properties simply do not exist, and hence the logic won't compile.

 

So the options are:

1. Use another ST Logic Routine which takes the FullName as an indirect to allow you to manipulate values...

2. Use ST SQL queries

 

The first is probably the better option.  It's more understandable, and less costly in performance.  And... even better.  The help has some help on this.

Core Reference > Coding > Logic > Checking that Aggregates are Enabled in Logic Programs

 

You'll need to combine what I've put above with your learnings from the help document, and then you should have the whole solution.

 

 

 

 


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 (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
Top Experts
User Count
BevanWeiss
Admiral BevanWeiss
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