YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Pop up text and time range on displays question Options · View
kgramly
#1 Posted : Tuesday, February 16, 2010 5:46:26 PM
Rank: Newbie
Groups: Member

Joined: 2/16/2010
Posts: 9
Location: Wyoming
Hi, I am new to this forum and have used PI for a few months up to this point. I am trying to make a process book for operators that is as my boss says, "like a videogame". He wants a graph showing production rate and when the cvalue fo the tag reaches certain points, text to pop saying "level 1" or something like that. Then when the next level is reached the previous text to dissapear and new text to appear.

Also, is there a way to show a static 12 hour (1 work shift) time range, and when that 12 hours is up, have the time range update to show the next 12 hour block? I'm pretty sure both of these things are possible, just not sure how to do it. Thank you for the help!

Kyle
Sponsor  
 

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.
RJK Solutions
#2 Posted : Tuesday, February 16, 2010 10:34:23 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 612
Location: Cheshire, United Kingdom.
Hi Kyle,

Welcome to the forum.

For your first point, you have a couple of options.
First would be to create a digital/string Performance Equation that simply sets the value to your various levels depending on your input value.
e.g. if 'sinusoid' > 50 then "Level 1" else "Not good enough"
Then you simply just display the above PE tag on your display.

Alternatively, you could place a series of Text symbols on your display and just MultiState them based on your input tag. Have a Text symbol that says "Level 1" with MultiState containing 2 states, State 1 "0 -> 99.99" No colour for the text. State 2 "100 --> ..." Colour for the text. etc

If you want to set 12 hour blocks, you can set it for the Display using the SetTimeRange method. e.g. ThisDisplay.SetTimeRange("*-12h","*")

Hope this helps...

Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
kgramly
#3 Posted : Wednesday, February 17, 2010 3:47:32 PM
Rank: Newbie
Groups: Member

Joined: 2/16/2010
Posts: 9
Location: Wyoming
Thanks, I forgot you could Multistate text to show no color. I'm still a little confused on the time thing though. Is the SetTimeRange a function I input under ThisDisplay in VBA? If so, what is the actual code to do that and will this then show a constant 12 hour block then once this is up move onto the next twelve hours?
Big
#4 Posted : Thursday, February 18, 2010 7:45:59 PM
Rank: Member
Groups: Member

Joined: 1/19/2010
Posts: 11
Location: Baton Rouge
kgramly wrote:
Thanks, I forgot you could Multistate text to show no color. I'm still a little confused on the time thing though. Is the SetTimeRange a function I input under ThisDisplay in VBA? If so, what is the actual code to do that and will this then show a constant 12 hour block then once this is up move onto the next twelve hours?


You'll have to apply the method using VBA.

Code:
Private Sub TrendConfig()

Dim trTrend As Trend
Dim strStart As String
Dim strEnd As String

strStart = "2/18/10 12:00 PM"
strEnd = "2/18/10 2:00 PM"

Set trTrend = ThisDisplay.Trend1
Call trTrend.SetTimeRange(strStart, strEnd)

Set trTrend = Nothing
End Sub


You will have to find a way for VBA to look at the time and pick the correct time ranges. The trend will also not automatically update with new data with the start and end time defined as such. There has to be a work around. I'm playing with it though.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.