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

Blinking text Options · View
butanon2
#1 Posted : Monday, February 15, 2010 10:45:55 AM
Rank: Newbie
Groups: Member

Joined: 2/15/2010
Posts: 7
Location: Amsterdam
Hi, I am new to this forum.

Is it possible to blink a text symbol on the processbook display without using the multistate property. (in VBA)
I want to blink this symbol when the contents of this symbol = 1

Thanks in advance
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 : Monday, February 15, 2010 11:28:34 AM
Rank: Administration

Groups: Administration

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

Welcome to the forum.

In VBA you could toggle the "Visible" property using:

Code:

TheSymbol.Visible = Not ThisSymbol.Visible


The issue you are going to face is a timer function for the blink. You could use some of the existing events to run the above code but you won't get the same effect as using MultiState.
Any particular reason you don't want to use MultiState?

Cheers,

Rhys.

Principal Consultant
Real-Time Data Management @ Wipro Technologies
butanon2
#3 Posted : Tuesday, February 16, 2010 7:11:47 AM
Rank: Newbie
Groups: Member

Joined: 2/15/2010
Posts: 7
Location: Amsterdam
Hi Rhys,

I use a module in VBA to check a PITag. This module checks if the setpoint of a temperature controller is changed, for at least 2° C, for the last 8 hours. I don't know how to do this with the Multistate function. Blushing

Michel.


RJK Solutions
#4 Posted : Tuesday, February 16, 2010 9:13:59 AM
Rank: Administration

Groups: Administration

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

If the StDev is any use then there is something you can do for this.

First, you can create a dataset to check for deviations.
- Create a new PI Expression Dataset, name it "SPChangeCheck".
- Set the expression to be "if StDev('sinusoid','*-8h','*') > 2 then 1 else 0" (Replace sinusoid with your tag name)
- Save it.
- Draw a value symbol on your display that displays your SetPoint tag.
- MultiState it, only now set the MultiState to use the Expression Dataset (Calculation) you created above.
- It will give you a couple of states by default, which is fine.
- Set State 1 to be "0.00000 -> 0.99999" with your normal colour.
- Set State 2 to Blink and change colour to Red.

Now whenever the current temperature has deviated by more than 2 over 8 hours it will blink red. No VBA needed BigGrin

Alternatively, you can programatically access a PI Expression Dataset to set the Expression. e.g. Do your calc in VBA, then access the Dataset set the Expression to "1" or "0", this will then be used in the MultiState to blink.

Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
butanon2
#5 Posted : Tuesday, February 16, 2010 10:33:13 AM
Rank: Newbie
Groups: Member

Joined: 2/15/2010
Posts: 7
Location: Amsterdam
Rhys, this is working fine.
I was not aware aware about the StDev function.

Thanks, ThumbsUp
Michel
RJK Solutions
#6 Posted : Tuesday, February 16, 2010 10:51:21 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 612
Location: Cheshire, United Kingdom.
Glad it is working BigGrin
For a full list of available Performance Equation functions, there is a help document called "PEReference.chm" in your "..\PIPC\Help" directory.

Cheers,

Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
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.