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!

Automatically Refresh Embedded Mimic Query List using Script

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
  • Automatically Refresh Embedded Mimic Query List using Script
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
308
AndrewScott
Admiral AndrewScott
98
BevanWeiss
Spock BevanWeiss
91
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
37
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-12 09:06 AM . Last Modified: ‎2023-05-03 12:16 AM

0 Likes
9
4027
  • 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-12 09:06 AM . Last Modified: ‎2023-05-03 12:16 AM

Automatically Refresh Embedded Mimic Query List using Script

Hello

 

I would be grateful if someone could help me write a script which updates a query list say every 10 seconds.

 

I tried

 

Public Sub Mimic_Refresh

 

While true

Mimic.Layers("Mimic").Item("Lst_1").sql  = Mimic.Layers("Mimic").Item("Lst_1").sql &" "

Sleep 10000

 

Wend

End Sub

 

But does not work.

 

Grateful for any help

 

Thanks

 

Tdog

Labels
  • Labels:
  • Scripting
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
BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-03-12 11:27 PM

In response to Anonymous user
1 Like
3
4005
  • 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-12 11:27 PM

I agree with Adam, this is not what scripting is intended for.

 

If you want an SQL query on the page to be updated every so often, then you will need the animation property for it to change.  This can be done by having the SQL animation include a meaningless point reference where that point is updated every X seconds.

 

The demo database has a horrible 'clock' example which has a noisy point that does something every second (I believe).  So you could add that to the animation.

 

Something like

'SELECT stuff you care about

FROM place you care about

WHERE things you care about are true AND (' + "PointValue" ' > -1 OR TRUE)'

 

In this way the query is different every x seconds, but the result of the query is still the same.


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

Reply

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

Replies 9
AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2020-03-12 02:33 PM

0 Likes
7
4023
  • 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-12 02:33 PM

That's not what scripting is for, it is single threaded and can be aborted by another scripting running.

 

What is the SQL doing/showing? If you're referencing database objects and include the id field the row content should update automatically. If its a data table/grid then it won't auto update.

 

 

Reply

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

Anonymous user
Not applicable

Posted: ‎2020-03-12 03:29 PM

In response to AdamWoodland
1 Like
6
4020
  • 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-12 03:29 PM

Hi adamwoodland

 

Perhaps if you look at this link

 

https://www.se.com/ww/en/faqs/FA383074/

 

This is close to what I wish to achieve only I would like to automate the query refresh at regular intervals.

 

surely the code fragment detailed in the link could be placed within a mimic script loop incorporating a sleep/wait command after a refresh for x amount of seconds before looping again?

 

Thank you for your reply.

 

Tdog

Reply

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

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-03-12 11:27 PM

In response to Anonymous user
1 Like
3
4006
  • 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-12 11:27 PM

I agree with Adam, this is not what scripting is intended for.

 

If you want an SQL query on the page to be updated every so often, then you will need the animation property for it to change.  This can be done by having the SQL animation include a meaningless point reference where that point is updated every X seconds.

 

The demo database has a horrible 'clock' example which has a noisy point that does something every second (I believe).  So you could add that to the animation.

 

Something like

'SELECT stuff you care about

FROM place you care about

WHERE things you care about are true AND (' + "PointValue" ' > -1 OR TRUE)'

 

In this way the query is different every x seconds, but the result of the query is still the same.


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

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

Anonymous user
Not applicable

Posted: ‎2020-03-13 02:03 AM

In response to BevanWeiss
0 Likes
2
4001
  • 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-13 02:03 AM

BevanWeiss

 

Thank you for the response - interesting idea.

 

Regards

 

Tdog

Reply

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

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2020-03-13 03:55 AM . Last Modified: ‎2020-03-13 03:55 AM

In response to Anonymous user
0 Likes
1
3995
  • 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-13 03:55 AM . Last Modified: ‎2020-03-13 03:55 AM

Many embedded lists will refresh automatically - ones which directly query database tables descending from CDBObject, such as points and RTUs. Lists such as events and historic data will not.

 

As an aside, if you DON'T want a query to refresh automatically there's an 'interest' checkbox on the embedded list object's properties.

 

Naturally, causing too regular refresh using the SQL animation method will cause extra database load, plus operator distraction as lists refresh - the trick is to find the right frequency - perhaps there is some other database item which changes, and you can JOIN using that?

 

The SQL animation method also requires you to take careful note of your " and ' characters, and to escape them as needed. This can get tricky when editing in the animation box, so using Notepad and cutting/pasting may help you.

The ' is used for string literals in animations and also for the SQL, so double-up single quotes for SQL within the single quotes.

Reply

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

Anonymous user
Not applicable

Posted: ‎2020-03-13 04:04 AM

In response to sbeadle
0 Likes
0
3992
  • 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-13 04:04 AM

Thank you for the detailed response

Reply

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

Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-03-13 08:48 AM

In response to Anonymous user
0 Likes
1
3985
  • 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-13 08:48 AM

I had asked for something similar quite a while back. Probably buried somewhere in the old forums. Mine was slightly more complicated due to have multiple embedded lists on the mimic I wanted to all refresh at the same time automatically. I was able to create a button on the Mimic that would refresh all of the embedded lists, that uses a small bit of script in the background. 

Reply

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

bamador
Ensign bamador
Ensign

Posted: ‎2020-03-13 10:24 AM

0 Likes
0
3983
  • 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-13 10:24 AM

Hi Tdog,

 

I got this to work with Animations on the embedded list. On the "SQL" property use a IIF( "~Global.List Update Trigger" > 0, 'SELECT * FROM CDBPoint, '' )  Then just toggle that Update Trigger with a Logic Program using the normal timer properties of the logic program.

 

-Brandon

Reply

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

Anonymous user
Not applicable

Posted: ‎2020-03-16 04:51 AM

In response to Hardin4019
0 Likes
0
3950
  • 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-16 04:51 AM

Thank you very much for taking time and effort to respond.

 

I will look into this

 

Tdog

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