Quantcast
Channel: OSIsoft Users Community
Viewing all 1120 articles
Browse latest View live

how to calculate running hour of any equipment?

$
0
0

how to calculate running hour of any equipment in PE, If we have two criteria to make my equipment run?


Vba error (Automatically generated parenthesis)

$
0
0

Good afternoon,

 

I'm having a problem with a vba macro in PI Process Book. I have a routine to play an alarm sound when a value is out of its operating range.

 

The routine is working well. But, always I open the .pdi, it automatically generates a left and right parenthesis on the end of my code, something like this: 

 

Private Sub Value2_DataUpdate()


          If value is out of range

              PlayWAV

              MsgBox ("A vazão de MEG do poço TBU-7 está abaixo de 90%")
          End If
   
End Sub
()

 

 

Which causes a compile error. I've already deleted the parenthesis and saved the code, but every time I open the .pdi , it is generated the right and left parenthesis again and so on..

 

Have you ever had this type of problem?

Changing plot date range for multiple graphs simultaneously

$
0
0

Hello,

 

I have a display book with many different plots of various monitored conditions around the plant.

 

Occasionally I wish to look back at events that have occurred in the past, using this display book. However if I wish to change the date range I have to currently manually change every single date range.

 

Is there a way to link multiple plots to the same date range, by way of a user-defined variable?

 

Our processbook build version is 3.2.0.0 (Aug 2009).

 

Thanks,

Nathan

Alternative Uses of OLEDB Enterprise

$
0
0

First off: hello, world!

 

Okay, now to business...I'm working out a plan for a PI system where the end users like the idea of using PowerPivot to access cubed PI data from the OLEDB Enterprise platform, but want that exact same cube data available to other systems.

 

I have some background with the PI historian and ProcessBook, but not nearly as familiar with this platform, hence the questions.

 

Imagine the following scenario:  end user is attempting to target some specific business intelligence over a recent time period and would like to slice based on the entire company's data, a specific region, and then a specific site.  Based on the seminars I've watched, OLEDB Enterprise connected to Excel PowerPivot will work very nicely.

 

Now, take it a step further:  end user wishes to use some custom, in-house software that will query the cubes much like PowerPivot would, only for other applications (ex. web).  CoreSight is an option for some of the data, but the end-user is very excited about having access to the cubes directly without having to go through the historian.

 

And now the questions...

 

  1. With OLEDB Enterprise, can a "cached" SQL environment of archived PI data be configured?  Of course *anything* is possible with enough engineering, but I'm more so targeting an out-of-the-box type solution versus custom.
  2. Assuming the SQL cache-cube environment is possible, what type of "lag" could we expect from the more recent archived data point in the cube versus the current value stored in archive?  Realistically, what's the probability of getting the "now" value in the cache every minute in a 1,000 tag environment? 10,000?  100,000?  1,000,000? Gut feelings are definitely acceptable here.
  3. Again, assuming #1 is something possible without designing the cube architecture from scratch, how would business users design new cubes without a DB admin helping them?  Obviously, we can trust only a few, power users to perform these tasks--but we don't necessarily need to send them to SQL school to perform them.  Again, if #1 has to be en entirely custom system, then the answer to this is simply, "go write a custom cube-maker."

Disclaimer:  I currently do not have access to an OLEDB Enterprise system to sandbox with.  Once I can leverage a PI-based solution, I can obtain the license and start tinkering.

 

Thank you!  I value any input and I will do my best to help explain any details that you feel are necessary.

Looking for an answer to a complex question

$
0
0

Let me start off by saying that I am sorry for the following long winded post. But please bare with me. My initial explanation of this quandary may be confusing to some, so please, feel free to ask questions for clarification.

 

I am looking to do a calculation in Pi that displays a value on a previously built display. I believe that I need to do this calculation in visual basic but I am not sure that it is possible.

 

As the plant engineer for a combined cycle power generating plant, we look closely at our heat rate as compared to megawatt generation. This basically tells us the efficiency of our plant. One of the calculations that I need to implement is one of a heat rate vs. megawatt. I have came up with the non-linear polynomial formulas for the heat rate. In these formulas, if I input the megawatt generation reading, it will show me the heat rate. To make it more complex, each month dictates a different heat rate based upon environmental conditions in the desert and due to contractual agreements, an escalation factor is entered for each year. In short, I have eight different functions, each function is based upon the month, and the factor is based upon the year.

 

What I am looking to do is perform this calculation in the background and display its output on the already made display screen.

 

An example would be:

 

year 2013 = factor x

month: point to the correct function that correlates to the month

megawatt generation is already a tag in the pi system

 

Then perform the calculation with the end result being displayed on the screen.

 

 

 

 

Display Comes from..?

$
0
0

Actually, i dont know a title for the topic.

 

I am building displays in tree format.

So, i have one display (D1), that is linked with other 3 displays (D2; D3; D4). Each of thess display is liked with another displays:

 

 

Lvl 1 :                                                 D1

                                                             |

                                 -------------------------------------------

                                 |                          |                          |

                                 |                          |                          |

Lvl 2:                       D2                      D3                      D4

                                 |                          |                          |

                                 |                          |                          |

                          ------------            -----------              ------------

                          |              |           |             |              |      |       |

                          |              |           |             |              |      |       |

Lvl 3:                D5         D6        D7         D8          D9  D10 D11

 

 

For example purposes, we will choose D2. So, D2 has 3 button:

B1 -->       D2 - D1

B2 -->       D2 - D5

B3 -->       D2 - D6

In the same way, D1 has one button:           B4 -->    D1 - D2

In the same way, D5 has one button:           B5 -->    D5 - D2

In the same way, D6 has one button:           B6 -->    D6 - D2

 

So, D2 can be accessed only from D1, D5 or D6.

Is there any way to discover where i came from? Well, I can be at D1, D5 or D6, to access D2. Once i reached D2, is there a way to know from where i came, if it was from D1, D5 or D6?

 

Sorry my english, but i think it is clear to understand!

Thanks for your attention!

 

Regards,

Naraiel Ferrari

 

Excel 2007 Datalink 2-D timestamp, data array

$
0
0

Trying to create a spreadsheet that shows archived values in a 2-D array (if possible).  The time range for data retrieval is 6 years, from June-Aug, and I want to represent the data in this format:


 

  0:00 1:00 2:00 3:00 4:00  …… 6/1/1999             6/2/1999             6/3/1999             …….            

 

 

I've created a separate array, for concatenating the date/time into a PI timestamp, which looks like this:

 

6/1/1999 0:00 6/1/99
1:00 6/1/1999
2:00 6/1/99
3:00 …. 6/2/1999
0:00 6/2/99
1:00 6/2/1999
2:00 6/2/99
3:00 …. 6/3/1999
0:00 6/3/99
1:00 6/3/1999
2:00 6/3/99
3:00 …. 6/4/1999
0:00 6/4/99
1:00 6/4/1999
2:00 6/4/99
3:00 …. …. …. …. …. ….

 

I thought  "Timed Data" would work, but I can't figure out how to tell Datalink to use Row(#) in my concatenated timestamp sheet for the Timestamps, and then extend the result series down, instead of manually doing each date.  

 

Maybe this is simple and i just haven't drank enough coffee....

 

thanks in advance

 

 

 

 

Data Feedback Loop is Essential to Performance of Solar Systems

$
0
0

Quality Crisis ‘Threatens’ Solar Industry

http://www.energymanagertoday.com/quality-crisis-threatens-solar-industry-092324/

 

May 30, 2013 by Energy Manager Today Staff

 

Testers, developers, financiers and insurers say that
solar panels are facing a quality control crisis, just as the technology
is on the cusp of widespread adoption, reports
the New York Times
.


 

However, the
scope of the problem is unclear. There are no official figures detailing how
big a problem defective panels are to the $77 billion solar industry.
Furthermore, when defects are discovered, confidentiality agreements often keep
the manufacturer’s identity a secret, the paper reports.


 

Instead, the
mooted crisis has been identified through anecdotal evidence. The
paper reports on an unnamed warehouse in California’s Inland Empire region east
of Los Angeles where panels ceased to function. Coatings that protect
the panels disintegrated, while other failings led to fires that took the array
off line for two years. These problems occurred just
two years in to the panels’ 25-year life span, the paper reports.


 

It appears that the quality control concerns come at a
far-from-opportune time: on the back of a surge in solar construction. Recent
figures from the Solar Energy Industries Association show that US solar
capacity grew from 83 MW in 2003 to 7,266 MW in 2012. Nearly half that capacity
was installed in 2012, the Times reports.


 

Quoted in the piece is Conrad Burke, general manager for DuPont’s photovoltaic
division, which supplies materials to solar manufacturers. Burke says that the
industry needs to “face up to the fact that corners are being cut.” Dave
Williams, chief designer at San Francisco-based solar developer Dissigno told
the Times that quality issues pose a long-term threat.


 

Most quality concerns are focussed on panels made in China,
where heavily indebted manufacturers are under “extreme pressure” to
cut costs, the paper reports. Executives
at companies that inspect Chinese manufacturers on behalf
of solar developers and their financial backers told the paper that even
companies with the best reputations have been found using “cheaper, untested
materials.”


 

Earlier this week, Brightergy Solar Solutions and Kansas City
Power & Light  announced plans to team
up to install solar panels on 80 buildings
by the end of this year, as part
of Kansas City’s plans to go solar. The buildings comprise police and fire
departments and community structures. The city will lease the energy for 20
years and pay a fixed rate for the electricity. The solar power generated
by the 80 buildings will provide the city with $40,000 in savings in the first
year.


 

 


Also:

“Take a look at this UC presentation about using the PI System in a solar network operating center (NOC) to monitor solar systems”
 

http://www.osisoft.com/Templates/item-abstract.aspx?id=9618



 




 

 



 


PI Calculation with 5 min average

$
0
0

i want to calculate day's average and maximum with 5 min duration. in processbook pi expression it's 10 min duration. how can i calculate for 5 min?

Let's Share Useful Code Snippets!

$
0
0

Hi Community,

 

A lot of us have been looking for a good place to share and discuss different functions that we find helpful in day-to-day PI activity, and that's exactly what we are going to do here and now.  Please feel free to provide different functions that you often use below so we can discuss and learn from them.  Any coding language and applications are welcome; just provide us with the language the code is written in and a brief description of what it does/what you use it for.

 

As a quick note, please do note request assistance troubleshooting code here as that is best handled by creating a new separate thread on the forum.

 

I'll start by providing a few of my favorite ProcessBook VBA macros:

 

Here is a short script that I use to iterate through every symbol in a ProcessBook display.  Usually I'll add an if statement so that I can sort by type.  I find this extremely helpful for passing along symbol changes.  For example, changing the time range on one trend automatically updating the time range on all other trends:

 

Dim Sym as PbObjLib.Symbol 'create a variable for a generic symbol'

For Each Sym in Application.ActiveDisplay.Symbols 'iterate through all symbols in display'

   If Sym.Type = <desired type> Then 'for the desired type use pbSYMBOLTYPE.pbSymbol<your desired symbol> for example a trend is pbSYMBOLTYPE.pbSymbolTrend'

      'insert code here'
 
   End If

Next Sym

 

This next one's a bit more complicated but I find it to be extremely valuable.  I have a trend symbol that I keep in the corner of my displays.  When I double-click on any bar or value symbol in my display the corner trend updates with an 8-hour trace of the bar or value symbol.  One of the very cool things about this code is that, because of how we resolve dataset names, we do not need any special handling to deal with symbols that use datasets.  This trend will update correctly no matter what we use:

 

Private Sub Display_BeforeDoubleClick(bCancelDefault As Boolean, ByVal lvarX As Long, ByVal lvarY As Long)

If ThisDisplay.Application.RunMode = True Then

    If SelectedSymbols.Count > 0 Then 'make sure we have actually double-clicked a symbol'
    
        If SelectedSymbols.Item(1).Type = pbSYMBOLTYPE.pbSymbolBar Or SelectedSymbols.Item(1).Type = pbSYMBOLTYPE.pbSymbolValue Then 'update trend for a bar or value symbol'
        
            bCancelDefault = True
            
            Trend1.RemoveTrace 1 'remove the existing trace'
            
            Trend1.AddTrace SelectedSymbols.Item(1).GetTagName(1) 'add a trace using the tag or dataset from the selected symbol'
            
        End If
        
    End If
    
End If

End Sub

 

I hope you find these scripts helpful and let me know if you'd like me to elaborate on any of the information provided here.

 

Please comment on and like any particularly helpful functions you find here.  We are looking forward to seeing the awesome scripts you all have created!

Create a running timer in PB based on value change

$
0
0

Ok, so hopefully this will be an easy one. I've started getting into performance equations and all things possible with it, but haven't seen or come across a way to start a timer. I see tons of after the fact calcualtions between two values of tags, but I need a REALTIME value.

 

So I monitor the equipment to ensure it is in the proper running state. Lets say that state is 5. That value is sent from the PLC to a PI Tag "EQUIPXX:SEQ_STATE"

 

I can monitor these tags, and see what is running and what is in a ware transfer. If the transfer takes too long, I want to know about it by using a multistate object and changing the color based on time elapsed.

 

In my head, I see this as a performance equation where it looks to see if the tag changed from a value of 5 to anything BUT 5, and starts a timer. (IF NOT) After it reaches 5 again, it stops counting, and displays the elapsed time until it happens again and starts from zero again.

 

. I will have a multistate object beside this value (a circle) that changes color based on how many seconds have elapsed.

 

Being able to catch sequence hangups and other issues is essential, but there's no quick and dirty way to do this from what I have found.

 

Is there a timer function that can be utilized by performance equations, or do I need to look elsewhere for a solution?

 

Thanks

Remove Bad Snapshot Value

$
0
0

I've recently found a lightly maintained PI system that I'm trying to nurse back to health.  During the process, I've discovered that sometime in the past, someone must have accidentally changed the system date to several months in the future and then back to the correct date.  This has caused all the active tags to have a snapshot value that is currently in the future.  I believe this is causing all new data to be written to the archive in an uncompressed format.

 

I've yet to find a way to remove this bad value from the snapshot table.  I've tried the procedure from the knowledgebase for deleting archive values on one point.  Piconfig acts like the command was accepted, but the value remains.

 

This is PI v 3.4.364

 

Thanks,

Darryl

Display

$
0
0

Hi,

I have a process book, which has two displays named "Display a" and "Display b". I have put a password condition in /before save event\ of "Display a", Now by clicking on a text on "Display a",  I goto "Display b" but the problem is when I make some changes in "Display b" and try to save it asks for the password, but that password prompt is only for "Display a".  I dont have any such code for "Display b". Why does it ask for password in "Display b"? And how can I fix that?

Thanks
 

List of Predefined Constants

$
0
0

Is there a file of the predefined constants such as "pbSYMBOLTYPE.pbSymbolBar"? I've probably missed it but have been unable to locate the definitions anywhere. It would be nice to be able to have a list where they are all defined in one place.

 

Thanx

 

The Flow Guy

HowTo: Open a trend in a display by clicking on a Value

$
0
0

Hello,

 

My name is Dennis and I already work 4 years with PI Processbook. I think it is time to use PI on a higher level and I want to develop a Processbook for Operators. The basic options are all clear to me and I got pretty far with building the Processbook. However, I want to build some other features in Processbook by using VB code. I followed a lot video on the Learning Channel but i can not find the thing I need.

 

In Processbook I use several tags from the DCS system that are defined in PI as 'Values'. What I want is: that by clicking on a value, a trend appears in a window or display. I prefer a window because it works faster, and it could be dragged to another screen. Is this possible? 

 

Could someone please explain how to do this? 

 

With Friendly Regards,

 

 

Dennis


Regarding multi state values

$
0
0

i want to do alarming event with multi state property if value is sustain above 5min on higher or lower side.how can i do it?

How to determine the active interface on redundant Foxboro A/I 70 interface nodes?

$
0
0

I am looking for a way to determine which interface is active and which is in standby on redundant PI nodes running the Foxboro A/I 70 series interface.

C# executable memory growing using PISDK (memory leaks)

$
0
0

Hi All.

I created a simple application that monitors values coming from single tag.
It subscribes to tag value changes via pisdk pipe.
The main problem is that after some period of time (after one day) the running executable memory growing twice.
The application crashed one week after it started because of out of memory exception.
I used ISlimFast and IRefresh interfaces to reduce memory size but nothing helped.

Here is an example of the application:

    class Program
    {
        private static PISDK.PISDK _pisdk = null;
        private static PISDK.IEventPipe2 _eventPipe = null;

        static void Main(string[] args)
        {
            _pisdk = new PISDK.PISDK();
            PISDK.Server piServer = _pisdk.Servers["XXX"];

            piServer.Open("UID=IDXXX");

            Monit(piServer, "tag='SOME_TAG_NAME'");
            Console.WriteLine("Start monitoring...");

            Console.WriteLine("Press ENTER to exit the application.");
            Console.ReadLine();
        }

        public static void Monit(PISDK.Server piServer, string filter)
        {
            PISDK.PointList pointList = piServer.GetPoints(filter);

            if (pointList == null || pointList.Count == 0)
            {
                pointList = null;
                return;
            }

            _pisdk.Refresh(pointList);

            _eventPipe = pointList.Data.EventPipe as PISDK.IEventPipe2;

 
         
((PISDK._DEventPipeEvents_Event)pointList.Data.EventPipe).OnNewValue +=
new PISDK._DEventPipeEvents_OnNewValueEventHandler(() =>
            {
                try
                {
                    if (_eventPipe.Count == 0)
                        return;

                    Array eventsArray = _eventPipe.TakeAll();

                    for (int i = 0; i < eventsArray.Length; ++i)
                    {
                        PISDK.PIEventObject newEvent = (PISDK.PIEventObject)eventsArray.GetValue(i);
                        PISDK.PointValue pointValue = newEvent.EventData as PISDK.PointValue;

                        string tagName = pointValue.PIPoint.Name;
                        string value = pointValue.PIValue.Value as string;
                        string time = pointValue.PIValue.TimeStamp.LocalDate.ToString("dd-MMM-yyyy HH:mm:ss");

                        Console.WriteLine("Point:{0}, Value:{1}, TimeStamp:{2}", tagName, value, time);

                        tagName = null;
                        value = null;
                        time = null;

                        pointValue = null;
                        newEvent = null;
                        eventsArray.SetValue(null, i);
                    }

                    eventsArray = null;

                    ((PISDKCommon.ISlimFast)piServer).SlimFast();
                }
                catch (Exception exp)
                {
                    Console.WriteLine("Error: {0}", exp.Message);
                }
            });
        }
    }
 

Can someone assist me with this issue?
Thanks!

 

 

Count bags from a weight tag

$
0
0

I have a PI-tag for a weight (PI-WEIGHT) and want to find how many bags I am weighing from this weight. 

 

The weight is giving data from every 4 second until every 30 second. A exemple would be like this:

 

100

140

170

150

200

250

300

150

0

 

As you can see the weight can go down at one point without the weighing is finished (from 170 to 150 and up to 200). in reality from these numbers there where only one bag finished there had a weight of 300 KG.

 

I have tryed to use this formula to count the bags:

=PIAdvCalcExpVal("(prevVal('PI-WEIGHT') > 200 and TagVal('PI-WEIGHT') < 200)";Starttime;Endtime;"total";"event-weighted";"interpolated";"1m";0;1;0;"PISERVER")

this give an error: Failed to retrieve events from server.  [-11110] Error with sample time array specification

 

The values I want to know:

  1. What are the bags weight?
  2. How many bags are finished between starttime and endtime?

Hope any can help :)

trend value color?

$
0
0

i want to give red color to my trend if my trend goes above certain value? or goes above reference value.

Viewing all 1120 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>