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

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Mimic Animation rudimentary alarm countdown timer

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
  • Mimic Animation rudimentary alarm countdown timer
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
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
307
AndrewScott
Admiral AndrewScott
95
BevanWeiss
Spock BevanWeiss
89
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
36
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
Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-01-13 08:53 AM . Last Modified: ‎2023-05-03 12:19 AM

0 Likes
9
4527
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 08:53 AM . Last Modified: ‎2023-05-03 12:19 AM

Mimic Animation rudimentary alarm countdown timer

I have some points (Advanced Modbus) that I would like to alarm for the Operator as soon as the value changes above the High High set point in SCADA that are timed Alarms in the Field RTU. I am working on getting the timer values from the RTU, but would like to make a short term work around. I understand polling times will effect the results. And if anyone has a better way of doing this, I'm open to suggestions.

 

I have made a Mimic that lists the Value of the point, the HH set point with no Persistance, a text field that indicates how long the point must be in HH alarm before any action is taken by the Field RTU. What I need some guidance on is, I would like to use a Mimic Animation Expression to calculate a very rough countdown timer on time remaining before the Field RTU logic causes some action so that the operator knows how much time they have left to react. 

 

The rough idea would be:

IIF(Point.AlarmState >= 2 ,(Fixed time period before action) - (Now - Point.StateChangeTime),'False')

Labels
  • Labels:
  • Mimics
  • SCADA
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
Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-01-14 07:33 AM

In response to BevanWeiss
0 Likes
0
4488
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-14 07:33 AM

I had to modify it some to get seconds since the alarm came in. The original formula was coming up with a result of / 86400 of a day as the final answer (I think).

 

IIF ( (TIME('NOW') - ".Point.StateChangeTime")*86400  > 86400,

  FORMATVAL('0.# days', ((TIME('NOW')-".Point.StateChangeTime")*86400)/86400),

  IIF( (TIME('NOW') - ".Point.StateChangeTime")*86400 > 3600,

    FORMATVAL('0.# hours', ((TIME('NOW')-".Point.StateChangeTime")*86400)/3600),

    IIF( (TIME('NOW') - ".Point.StateChangeTime")*86400 > 60,

      FORMATVAL( '0.# minutes', ((TIME('NOW')-".Point.StateChangeTime")*86400)/60.0),

      FORMATVAL( '0.# seconds', ((TIME('NOW')-".Point.StateChangeTime")*86400))

    )

  )

)

 

I trimmed this down and made it a Minutes and Seconds count down timer, where the 1200 is a constant = 20 minutes, and in mine I am using a Variable that is the current time instead of TIME('NOW') :

 

IIF( (1200-(TIME('NOW') - ".Point.StateChangeTime")*86400) > 60,

      FORMATVAL( '0.# minutes', (1200-(("...Time"-".Point.StateChangeTime")*86400))/60.0),

      FORMATVAL( '0 seconds', (1200-(("...Time"-".Point.StateChangeTime")*86400)))

)

 

(Final Result)

To clean it up further and prevent going less than 0 Seconds while counting down, and to prevent count down after the alarm has cleared : 

 

IIF( "Point.AlarmState" >= 2,

      IIF( ("...Time" - ".Point.StateChangeTime")*86400) <= 1200,  

          IIF( (1200-("...Time" - ".Point.StateChangeTime")*86400) > 60,

                FORMATVAL( '0.# minutes', (1200-(("...Time"-".Point.StateChangeTime")*86400))/60.0),

                FORMATVAL( '0 seconds', (1200-(("...Time"-".Point.StateChangeTime")*86400)))

               ),

     '0 Seconds'),

'Not in Alarm')

See Answer In Context

Reply

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

Replies 9
BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-01-13 10:09 AM

0 Likes
8
4523
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 10:09 AM

You'll want to look into the Properties of the point for something like a StateChangeTime.

And then you could difference that against "Now".

It's not going to account for polling time, but for long enough action times this wouldn't be so important.


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.

Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-01-13 10:33 AM

In response to BevanWeiss
0 Likes
7
4521
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 10:33 AM

Thanks for the reply Bevan. The "Now" doesn't seem to work as a part of an expression, but I had figured out that I already have a point created for current Date_Time that I can use. So I am making some progress.

 

Right now I have it counting down seconds, but I am having issues getting the results of the expression to combine the (Remaining seconds) + ' Seconds' into a string to display in a text field. Ideally I am trying to use an IIF statement to change the display from saying  X.X Minutes to X.X Seconds if the remaining time is < 60 seconds. I'm sure I'm doing something wrong with syntax of trying to combine a number and a string.

Reply

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

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-01-13 10:53 AM

In response to Hardin4019
0 Likes
4
4516
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 10:53 AM

I really remembered there being a NOW in the Expression syntax, but looking at the help file (useful guide), it suggests that I'm wrong, and that it should be:

TIME(TIME VALUE)

Where:
•TIME VALUE is a STRING that provides an OPC relative time value.

 

one slightly annoying thing about expressions is that you can't store intermediate results, so to do something like conditional formatting you're going to end up repeating certain expression terms quite a lot.

 

You could do something like

IIF (TIME('NOW') - ".Point.StateChangeTime" > 86400,

  FORMATVAL('0.# days', (TIME('NOW') - ".Point.StateChangeTime")/86400,

  IIF( TIME('NOW') - ".Point.StateChangeTime" > 3600,

    FORMATVAL('0.# hours', (TIME('NOW') - ".Point.StateChangeTime")/3600,

    IIF( TIME('NOW') - ".Point.StateChangeTime" > 60,

      FORMATVAL( '0.# minutes', (TIME('NOW')-".Point.StateChangeTime")/60.0),

      FORMATVAL( '0.# seconds', (TIME('NOW')-".Point.StateChangeTime")

    )

  )

)

 

Not sure if my syntax is right on that.. it's been a while since I've dived into the expressions, and I'm rusty already.


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.

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-01-13 10:55 AM

In response to BevanWeiss
0 Likes
0
4515
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 10:55 AM

I should add... within expressions, you can use { ... } to include comments.

When you start to make complicated expressions then it will become useful to comment them


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.

Hardin4019
Lieutenant Hardin4019
Lieutenant

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

In response to Hardin4019
0 Likes
1
4514
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 11:03 AM

I figured out my issue. I was forgetting to add STR() when combining a number value and a String. All good now.

Reply

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

Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-01-13 11:30 AM

In response to BevanWeiss
0 Likes
1
4511
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 11:30 AM

I'm glad there are people as experienced as you to find things like TIME('NOW'), because that completely slipped my mind. I found TIME() in the help viewer, but wasn't thinking about how 'NOW' was also a valid OPC time. I also tried searching the help viewer for "Expression Now" and came up blank. Clearly I have room for improvement on the programming and syntax side.

 

Side note. I tried TIME('NOW') and my method of using a Time Variable that has the current system time assigned to it. Oddly enough the TIME('NOW') only updates when the mimic is opened or saved, so I suspect that some action is required to kick the TIME('NOW') to update, and won't quite work for the intended Mimic. 

Reply

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

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-01-13 12:02 PM

In response to Hardin4019
1 Like
0
4505
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 12:02 PM

I'd recommend just filing the TIME('NOW') as a 'bug' with Schneider Tech Support.  It's possible that they will push back with a reasoning, but perhaps there is a more recommend manner to get current time (outside of having a DB object, with it's additional server load etc).

 

I suspect the issue is that nothing 'inside' the TIME('NOW') expression is changing in the mimic.  The 'NOW' is a constant, so is evaluated once on mimic load / navigate, and then not again.  I suspect that this same issue would occur with TIME('s') or TIME('s-2s') or any equivalent OPC valid string.


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.

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2020-01-13 12:03 PM

In response to Hardin4019
0 Likes
0
4504
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-13 12:03 PM

I'd recommend FORMATVAL over STR... FORMATVAL gives more explicit definition of the string format for the numeric 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..
Reply

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

Hardin4019
Lieutenant Hardin4019
Lieutenant

Posted: ‎2020-01-14 07:33 AM

In response to BevanWeiss
0 Likes
0
4489
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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-01-14 07:33 AM

I had to modify it some to get seconds since the alarm came in. The original formula was coming up with a result of / 86400 of a day as the final answer (I think).

 

IIF ( (TIME('NOW') - ".Point.StateChangeTime")*86400  > 86400,

  FORMATVAL('0.# days', ((TIME('NOW')-".Point.StateChangeTime")*86400)/86400),

  IIF( (TIME('NOW') - ".Point.StateChangeTime")*86400 > 3600,

    FORMATVAL('0.# hours', ((TIME('NOW')-".Point.StateChangeTime")*86400)/3600),

    IIF( (TIME('NOW') - ".Point.StateChangeTime")*86400 > 60,

      FORMATVAL( '0.# minutes', ((TIME('NOW')-".Point.StateChangeTime")*86400)/60.0),

      FORMATVAL( '0.# seconds', ((TIME('NOW')-".Point.StateChangeTime")*86400))

    )

  )

)

 

I trimmed this down and made it a Minutes and Seconds count down timer, where the 1200 is a constant = 20 minutes, and in mine I am using a Variable that is the current time instead of TIME('NOW') :

 

IIF( (1200-(TIME('NOW') - ".Point.StateChangeTime")*86400) > 60,

      FORMATVAL( '0.# minutes', (1200-(("...Time"-".Point.StateChangeTime")*86400))/60.0),

      FORMATVAL( '0 seconds', (1200-(("...Time"-".Point.StateChangeTime")*86400)))

)

 

(Final Result)

To clean it up further and prevent going less than 0 Seconds while counting down, and to prevent count down after the alarm has cleared : 

 

IIF( "Point.AlarmState" >= 2,

      IIF( ("...Time" - ".Point.StateChangeTime")*86400) <= 1200,  

          IIF( (1200-("...Time" - ".Point.StateChangeTime")*86400) > 60,

                FORMATVAL( '0.# minutes', (1200-(("...Time"-".Point.StateChangeTime")*86400))/60.0),

                FORMATVAL( '0 seconds', (1200-(("...Time"-".Point.StateChangeTime")*86400)))

               ),

     '0 Seconds'),

'Not in Alarm')

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