|
|
Rank: Newbie Groups: Member
Joined: 1/14/2010 Posts: 7
|
At the moment I'm collecting the amount of time a machine is running in seconds. Actually several machines but they each have there own tag. I now need to display this data in a process book but I would like to be able to give the user a nicely formatted HH:MM:SS display rather then just a large number of seconds. Short of creating three PE tags for each machine (one to store hours, one for min and one for seconds) I'm not sure how I would accomplish this. I'm hoping it can be easily reused too because this data might be going on multiple displays and more machines will be added. Thanks in advance.
|
|
|
|
|
OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System. We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ or contact OSIsoft vCampus for more details.
|
|
|
Rank: Advanced Member Groups: Member
Joined: 12/3/2009 Posts: 71 Location: Germany/Pennsylvania
|
Divide your value by 3600, take the integer part (INT) of this number, you have the hours. Take the fractional part of this division (FRAC) and continue in the same manner for the minutes and so on. Finally, concatenate everything using CONCAT.
Michael
|
|
|
Rank: Newbie Groups: Member
Joined: 1/14/2010 Posts: 7
|
Thanks a lot, that should work beautifully.
|
|
|
|
Guest
|