Ask our Experts
Didn't find what you are looking for? Ask our experts!
Launch of Consumer/Home Owner registration process! We are pleased to announce the commencement of the Consumer/Home Owner Registration Process on Community. Consumers/Home Owners may now proceed to register by clicking on Login/Register. The process is straightforward and designed to be completed in just a few steps.
A support forum for AVEVA Plant SCADA (formerly Citect SCADA). Share new and exciting product information, connect, learn, and collaborate with the ecosystem of Plant SCADA Users. AVEVA Plant SCADA a reliable, flexible and high-performance Supervisory Control and Data Acquisition software solution for industrial process customers. This forum is to connect, share, learn and collaborate new and exciting product information. Feel free to join and share to your Ecosystem of Plant SCADA Users.
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-11-08 08:34 AM
Dear all,
Currently I was customizing an expression in EMSE's scheduler to add up 2 time duration. However, I fail to do so. Hence request expert to advise. Below was the scenario:
Time_A = 81 sec
Time_B = 00:00:31
And I would like to display the total time was 00:01:52. Hence I have been using below statement in the scheduler expression :
Format("%h", Time_A + Hour2Clock(Time_B))
However, I was not able to get the result as what I targeted. The result shows "8100:00:31".
Can anyone advise me how should I add up this 2 time duration?
Thanks in advance.
from,
Lee Wai Lip
MPE Kinetic Sdn. Bhd. , Malaysia
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-11-10 01:06 AM
Hi,
the result "8100:00:31" indicates that you are summing two string Tags, if you do for instance "81" + "00:00:31". This would concatenate the 2 string values rather than summ seconds. Do do what you expect, you have to make the Tag "Time_A" a numeric Tag (integer), while "Time_B" Tag is a string. Since the function "Hour2Clock()" returns an integer too, you will end up summing 2 numeric values which represents the time in seconds.
I hope that helps.
Greets
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
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.