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

Manual Data Input into the DataSet directly in ProcessBook Options · View
Ellsworth Morriss
#1 Posted : Saturday, September 03, 2011 2:32:14 AM
Rank: Newbie
Groups: Member

Joined: 9/3/2011
Posts: 1
Location: aa
Hi ,

I have more DataSets in one ProcessBook
The formula is as follows : TimeLE('M135P005R_RUN', '-45D',' *', "RUN")/60/60/24 . - lets say that there are around 20 formulas for different tags.

I need that the user can change the period of time (the 45 days) with a simple action for all the datasets in the same time.

Thanks,
Ellsworth Morriss
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.
caffreys_col
#2 Posted : Friday, September 09, 2011 3:25:45 PM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2011
Posts: 40
Location: Grimsby UK
Try the code below...


Private Sub CommandButton1_Click()
Dim x As PBObjLib.Dataset

Set x = Application.ActiveDisplay.Datasets.GetDataset("test1")
x.Expression = "'sinusoid' /" & TextBox1.Text

Application.ActiveDisplay.Datasets.SetDataset x

End Sub

In the above code you have a textbox on screen which has a value in it, and a command button. Whenever you click on the command button it will update the dataset to be ('sinusoid' / "value in the text box").

I would make sure that when you open the PI display that you assign a value to the text box otherwise you will get error messages if you accidentally click the command button!

If you want me to send you my test display just let me know.
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.