I need help :-)
Is there any kind of debugging funktion for performance equations? How can I test the code? I need a few PEs but if there is an error in it I never know where to look at...
Thanks a lot!
you may use PIPETEST on the pi server (in PI\ADM). But I really would like to suggest you call techsupport if you need help on this.
As Andreas pointed out, this is really more of a Tech Support question (unless you want to test it using PI SDK ... just let us know), but there is another approach (not command line) to testing these: you can use the PI System Management Tools (SMT) > Points > Performance Equations plug-in (see the Evaluation button on the second tab).
Hope this helps!
Thank you very much for your help!
@Steve: That's what I meant. I try to get a special PE but before asking here every single step I wanted to try it by myself. More follows as soon as I get some code to ask about...
now I tried something but there still are some questions:
I need the difference of a tag values between midnight and the midnight before. Means, I want to know how the values changed within a day. Here is my attempt:
EVENT=?, TagVal('Test.Typ', "*") - TagVal('Test.Typ', "*-24h")
I guess it should work, but how could I make sure that my event is at midnight? When trying to work with timestamp I failed: 00:00:00 ?
Thank you very much!
Hi, have you tried;
TagVal('Test.Typ',"t") - TagVal('Test.Typ',"y")
Henry's suggested equation will calculation the difference in value of the same tag of today at 12:00am and yesterday at 12:00am, so it will probably be helpful to you.
To add on to the post, another thing that you can look at is the scheduling of the PE tag, how you can control when a calculation happens. A PE tag can be clock scheduled (calculated after a specific time interval) or natural scheduled (triggered when another tag receives a new value). If we look at your equation:
TagVal('Test.Typ', "*") - TagVal('Test.Typ', "*-24h")
If you want to ensure that the calculation happens at a specific time, clock scheduling will be a better option, because you can control the calculation interval and offset. This would be a matter of configuration on Performance Equation Scheduler, hence you can contact our Techsupport Team if you need more assistance on this or have someone to walk through the configuration with you. =)
thank you both for your help!
@Henryk: does that mean that "t" is equal to 12am and "y" is 12am the day before?
@Han Yong: timescheduling is exactly what I need. Which means instead of "?" I would suggest something like "t". Or doI have to go to the scheduling task where I have the fiedl "Clock scheduling/ Scan class"?
Thank you again!
What I found so far about clock scheduling is this:
the first one (hh:mm:ss) means the period of calculation. there I would expect 24:00:00. The second one is the starttime, so there 00:00:00 should work for midnight.
Unfortunately I get an error on that when I try to save that on my tag...
Including the "Event=<tagname>" syntax in the extended descriptor (exdesc) of the PE tag only works by specifying the triggering tag for natural scheduling.
For clock scheduling, you should be configuring the /f=hh:mm:ss, hh:mm:ss setting in the PE Scheduler scan class configuration (.bat) instead, and setting the tag to the use the scan class. Your setting for the scan class seem should be appropriate, and now you just need to configure it.
Sorry, if I am not that fast... :)
So you are saying I have to define those classes in my pipeschd.bat file first and then link those classes to my location4 setting in PI SMT. Do I get that right?
@Alexander: yes. This is what Han Yong describes. Whenever you see a "/f=hh:mm:ss, hh:mm:ss" this refers to the batch file starting the interface. Revisiting my initial comment, you should really take advantage of OSIsoft’s techsupport and the online training available at vcampus regarding the PI PE Scheduler: vcampus.osisoft.com/.../training_center_landing.aspx.
Thank you a lot!
I will have a training :-) I just needed this function right now. It is not that easy to get a class for PI System Manager 1. The first one in Germany which is still free is in June...
I just found a discussion related to my topic here:
Now I got the manual and know where to look that up...
@Alexander, I see what you mean - the SM1 classes in the german office are quite busy - looking forward to see you in June in the Frankfurt office.
Meanwhile the online training (vcampus.osisoft.com/.../default.aspx) might provide some help - in the online PI SM1 you have chapter 1.5 to introduce you on timestamps (there are *many* options), and chapter 10 for Performance Equations. Take advantage of your vCampus subscription that include these CBT's online at the above link!
Wait - nobody should have to deal with editing the pipeschd.bat file directly, including the scan classes (/f) settings...
As you will learn in the PI System Manager I course (whether you take it online or instructor-led), it is strongly recommended that you use the PI Interface Configuration Utility (ICU) for any work related to configuration and maintenance of PI Interfaces. As I pointed out in this other post, that includes default simulator interfaces (i.e. Random and RampSoak) as well as the PI Performance Equations Scheduler.
The course materials and our regular Technical Support can help you with this... especially since you said you needed this function "right now", I think it may be more appropriate to channel this through Tech Support (which may do a remote desktop session and help you tackle multiple things in real-time, on the phone), rather than than discussion forums like here (where answers are always a little delayed). Especially since this truly is a system management topic and not a programming/integration one (just trying to help you make the most out of available resources ).
thank you for this advice, too! I just like to understand things :-) And as I mentioned, I will visit a SM1 class in June and other... The answer I needed is already here and I already added the pipeschd.bat
So, thank you all! It was helpful and just in time ;-)
There you go, glad we could help!
@Alexander: Yes mate, "t" is midnight or 12am today, and "y" is midnight or 12am yesterday.
Tonight I run the first actual "midnight"-test. Everything works fine! Thanks a lot to all!
Thats a good thing to know
Now that the issue is resolved, let's look at the whole procedure in retrospect and see if it was the most efficient way to handle it. Given the nature of the question, Tech Support would have been able to resolve the issue in a much more efficient way given the tools they have at their disposal.
I am curious what you think would have happened if the issue was approached through regular Tech Support. Our goal is always to address community's questions and concerns in the best and most efficient way possible
Certainly not the most efficient for Alexander, I dare say he could've had his issue resolved withing a a couple of hours via tech support.
But from a fostering of the "community" perspective, I thought it was very good. In the process of solving what might be a relatively simple problem, others might have followed the thread and picked up useful bits of information as well. At the end of the day it allowed members to contribute and learn together through the process.
I cannot disagree with you on the learning part. However, the issue is efficiency. Given the nature of the community here (namely developers and partners and system integrators as opposed to end users and system administrators) focusing our energy and attention to development and integration oriented questions may be more fruitful. I wish we had all the time and energy in the world to do them all; but at some point we need to think of efficiency.
Retrieving data ...