|
|
Rank: Newbie Groups: Member
Joined: 8/24/2008 Posts: 3 Location: Gladstone, Qld.
|
I have a display that I use to estimate return to service time of a boiler/turbine set. The estimated times from start of firing to synchronisation and then to load to 110MW is calculated. I wish to plot this on a trend as a line, with the actual load trend being displayed as well. This will allow a visual display of progress versus estimate. Any thoughts on how to draw a straight line dynamically. I am reasonably proficient in programming with VBA, as this is what is used to fill the text boxes.
|
|
|
|
|
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: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
hi JD, do you mean that you want to add a trace to the trend as a straight line? or you want to add a straight line object (pbSymbolLine)? if you want to add a trace then you can dynamically create a dataset and assign it a constant value and draw it on the trend. I notice you are doing estimates (predictions) vs actuals, a little trick I have done in the past is to overlay the estimate trend with transparent background on top with an offset (say 24 hours) of the actual trend. now the estimation will appear as future predicted data. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Newbie Groups: Member
Joined: 8/24/2008 Posts: 3 Location: Gladstone, Qld.
|
I was going to add a picture of display, but do not know how to do this. What I have is a trend with one trace that shows current progress of unit start (load vs time). The estimated load up time from 0MW to 110MW can be represented by a sloped straight line, this is what I want to add to the trend. I was reading yesterday, that I could use a dataset, but I hven't used these before. I have downloaded the white paper from OSI about datasets. Any tips on how to start with a dataset would be appreciated.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
JD,
The easiest way is to store your ramping values into a PI tag and then use the data in a trend/calculations etc As a quick example of how to use the data in a trend and show it as "future" values, follow this example using Sinusoid PI tag.
If you are working with 24 hours worth of predicted data you can show this on a PI trend as the future values and watch as you actual data should follow the path of your predicted, you will be able to spot deviations quickly. With Sinusoid you are going to create 2 datasets that mimic the following:
Planned Sinusoid data (future predicted values) Typically this would be stored into a PI tag from *-24 hours (or whatever your offset is going to be) into a PI tag. For example, the data in PI tag "MY:FUTUREVALUE" from the archives (*-24h to *) actually represents * to *+24h. This is where the datasets come in to provide an offest to the data retrieval. In this example, what you will do is create a dataset name "PLANNED.SINUSOID". Datasets make use of performance equation syntax and VBScript (for conditional statements). To create this dataset: - Go to "Tools --> DataSets" - "New --> PI Calculation" - Name = "PLANNED", Select Stepped if required, select correct PI server. - For Expression enter TagVal('SINUSOID','*-24h') This will retrieve the value from 24 hours ago that represents the current time when plotted on a trend. - Set Interval, 10m for example. - Set Column Label to "SINUSOID" and click OK.
Actual Sinusoid data (current values) This is the same process to create the dataset as above with the dataset name being "ACTUAL" and column name "SINUSOID". The expression should be TagVal('SINUSOID','*').
With both of your datasets created you can build your Trend ready to watch for deviations. Using SINUSOID you won't actually see any deviations but you will see your Actual trace eating up your planned trace.
Create a Trend and set the scale to Single Scale with the plot time Start = "*-1 Day" and the End = "*+1 Day". Once the time range is set add the datasets to the Trend, first the Planned dataset (PLANNED.SINUSOID) followed by the Actual dataset (ACTUAL.SINUSOID). Now that this is done you should see the following (or similar):

So how you could use a similar method is whenever you are starting up a piece of equipment and know the estimated time until it is up and running, then use that time period as your offset. Create/use a planned PI tag associated with that equipment to store your ramping values and use the Trend/DataSet methods above.
Hope this helps! By the way, I use something like Photobucket to upload images and just paste the link in here.
Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
Using an ODBC dataset and connecting to an Excel worksheet will also do what you want.
Create a new Excel worksheet and on your sheet create 3 column headers "PI_TIMESTAMP", "PI_VALUE", "PI_STATUS". Enter your ramping data and timestamps where you expect the equipment to be at what time. For each row enter 0 as the status. Select all your data and create it as a named range on the worksheet, for example "PI_TABLE". Save workbook and close.
Double click your trend and select ODBC dataset to be added to the trend. Click "New" and enter the name as "RAMPING" (or whatever you want). Click the setup button and then "Add". Select "Microsoft Excel Driver (*.xls)" and enter a DSN, for example "RAMP_EXAMPLE". Next select your workbook click OK and then your data source is created. Click OK to return to DataSets in ProcessBook. Next click "Design" (opens MS Query) and select your ODBC datasource (RAMP_EXAMPLE). You should see the name range that you create earlier, select each of the available columns. Click "Next, Next, Finish". You should now see 3 available columns for your dataset. Save your dataset (click on Dataset name) and then click on "PI_VALUE" and click OK. Your ramping dataset is now added to your trend.
You should get something like this:

Enjoy!Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Advanced Member Groups: Member
Joined: 5/28/2009 Posts: 75 Location: Cheshire, UK
|
Browsing the site for info on Header Sets in the MDB I came across this thread. Marvelous! I don't have the specific requirement of the poster but I can use this facility. I'd always (OK not always) known that ODBC DataSets could be used to include non-PI data in ProcesBooks but now I know they are so easy to implement I'm having a go. thank you, Miles MilesUK ProcessBook v3.0.15.3
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
milesUK wrote:Browsing the site for info on Header Sets in the MDB I came across this thread. Marvelous! I don't have the specific requirement of the poster but I can use this facility. I'd always (OK not always) known that ODBC DataSets could be used to include non-PI data in ProcesBooks but now I know they are so easy to implement I'm having a go.
thank you,
Miles Hi Miles...glad the forum helped. For info, things get a whole lot easier with AF and ProcessBook >= v3.1 where you have the AF Dataset to retrieve and plot data from AF. With an AF Data Reference you can get data from any source you have a Data Reference for...in ProcessBook you only ever make use of the AF Dataset. Cheers, Rhys. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Newbie Groups: Member
Joined: 3/11/2011 Posts: 1
|
RJK Solutions wrote:JD,
The easiest way is to store your ramping values into a PI tag and then use the data in a trend/calculations etc As a quick example of how to use the data in a trend and show it as "future" values, follow this example using Sinusoid PI tag.
If you are working with 24 hours worth of predicted data you can show this on a PI trend as the future values and watch as you actual data should follow the path of your predicted, you will be able to spot deviations quickly. With Sinusoid you are going to create 2 datasets that mimic the following:
Planned Sinusoid data (future predicted values) Typically this would be stored into a PI tag from *-24 hours (or whatever your offset is going to be) into a PI tag. For example, the data in PI tag "MY:FUTUREVALUE" from the archives (*-24h to *) actually represents * to *+24h. This is where the datasets come in to provide an offest to the data retrieval. In this example, what you will do is create a dataset name "PLANNED.SINUSOID". Datasets make use of performance equation syntax and VBScript (for conditional statements). To create this dataset: - Go to "Tools --> DataSets" - "New --> PI Calculation" - Name = "PLANNED", Select Stepped if required, select correct PI server. - For Expression enter TagVal('SINUSOID','*-24h') This will retrieve the value from 24 hours ago that represents the current time when plotted on a trend. - Set Interval, 10m for example. - Set Column Label to "SINUSOID" and click OK.
Actual Sinusoid data (current values) This is the same process to create the dataset as above with the dataset name being "ACTUAL" and column name "SINUSOID". The expression should be TagVal('SINUSOID','*').
With both of your datasets created you can build your Trend ready to watch for deviations. Using SINUSOID you won't actually see any deviations but you will see your Actual trace eating up your planned trace.
Create a Trend and set the scale to Single Scale with the plot time Start = "*-1 Day" and the End = "*+1 Day". Once the time range is set add the datasets to the Trend, first the Planned dataset (PLANNED.SINUSOID) followed by the Actual dataset (ACTUAL.SINUSOID). Now that this is done you should see the following (or similar):

So how you could use a similar method is whenever you are starting up a piece of equipment and know the estimated time until it is up and running, then use that time period as your offset. Create/use a planned PI tag associated with that equipment to store your ramping values and use the Trend/DataSet methods above.
Hope this helps! By the way, I use something like Photobucket to upload images and just paste the link in here.
I have a question related to this topic I was hoping you might have a solution to. The following dataset works for overlaying a specific day on to a current day so that I can compare the current day with any day in the past. TagVal('Sinusoid',('*' - 'T' + '08-Feb-05')) The problem is when I attempt to add two days or offset this previous day by one hour. I am wondering if there is a way to do that?
|
|
|
Rank: Member Groups: Member
Joined: 1/24/2012 Posts: 10 Location: mjcordeiro
|
Hi, I'm trying to use this post to my analisis. I've created the DATASET like JD explain in his post. The result I have is this: https://plus.google.com/...authkey=CJujlLz4uv_x6gE
It seems that I have here a time delay or something... Those lines should be more-or-less equal. Any help is appreciated. Thanks. Mário
|
|
|
Rank: Advanced Member Groups: Member
Joined: 4/6/2011 Posts: 40 Location: Grimsby UK
|
Hi Mario,
It looks like you have data in the future for your green trace (it goes to the 10/2/2012); is this correct?? which method of dataset are you trying? are you using Excel and a link through ODBC? If so, you may have your dates/times wrong in your excel sheet.
|
|
|
Rank: Member Groups: Member
Joined: 1/24/2012 Posts: 10 Location: mjcordeiro
|
caffreys_col wrote:Hi Mario,
It looks like you have data in the future for your green trace (it goes to the 10/2/2012); is this correct?? which method of dataset are you trying? are you using Excel and a link through ODBC? If so, you may have your dates/times wrong in your excel sheet. Hello caffreys_col That's what I think, it's a question of periods of time. I use the simple PIProcessBook Trend for this. The green trace is the "future prediction" line and the other one is the actual values. My intention is to know what is the value of a certain Temperature in the "future" (for example, I want to perdict the value ot the temperature tomorrow at 14:00) Is there a way to do this in code? Let's say, I create a question box for the time and I will ask the PI for the calculated value. I tell you what I've done with this trend: A) Green line in Trend: "FUTURE PREDICTION" - I Create a DATASET (FUTURE), and in expression I've entered: TagVal('S1.TEMP','*-24h') - Set interval : 10m B) Blue line in trend (ACTUAL): "ACTUAL VALUE" - I Create a DATASET, and in expression I've entered: TagVal('S1.TEMP','*') - Set interval : 10m c) Create a Trend with datasets FUTURE and ACTUAL - Start time "*-1 Day" - End time "*+1 Day" And the result is what you see in the picture. I already change the time f the trend and didn't work :(((( Any help is welcome. Thanks, Mário
|
|
|
|
Guest
|