we have to develop some calculation where we want to use PI datalink expression PIAdvCalcFilVal() and PITimeFilterVal() in PI ACE. could any can suggest the approach for this?
Thanks in advance ! ! !
Happy PI !
You have to get the method from piValues1. Try piValues1.FilteredSummaries
My answer is assuming your version contains the method. If your version doesn't have the method, then it won't work.
My strongest recommendation is not to make any DataLink calls from a PI ACE, which is based on PI SDK. Instead use the equivalent function available in PI SDK.
Another suggestion is to use PI AF SDK iwth PI ACE (instead of PI SDK). You will get better performance but it is more complex to implement. Make sure to switch your .NET Framework version from 2.0 to 4.0+.
I used to give such advice years ago but the landscape has changed with subsequent releases of AF SDK requiring a higher version of .NET. PI ACE is limited to Visual Studio 2013 or earlier. As each new release of AF SDK comes out, it is no longer a seamless process to load AF SDK references inside a PI ACE project.
Perhaps the alternate advice would be to consider not using PI ACE and instead write an AF SDK application. The difficulty there is the triggering or scheduling of the calculations.
I agree - an AF SDK application is the better way to go. One option for scheduling that I have used in several such applications is Quartz.NET, which is an enterprise scheduler library. It's not that hard to use and gives a lot of flexibility in scheduling.
Thank you all for your valuable feedback.
I am looking into the IPIData2 PI SDK function where i can see "FilteredSummaries Method" & "PercentTrue Method" which will solve my problem. However the environment in which I am developing this calculation have lower version of PI SDK i.e. 22.214.171.1243 where i am unable to see this method. can you please help to understand how to use this method in PI SDK 126.96.36.1993 ?
PFB screen shot. Also we do not have AF there so i can not use AF SDK.
As we are unable to install and upgrade the PI version there due to business concern please avoid to give update suggestion.
Happy PI ! !
Unfortunately this method is simply not available in that version of the PI-SDK, and there is no equivalent workaround.
Unless your client is using a really old version of PI, an AF SDK application will work with PI Data Archive version 3.4.380 or higher. You don't need to have AF implemented to use the AF SDK, as the PI namespace is used for accessing the PI Data Archive server.
I have figured it out. thanks for your reply. this is what exactly i am looking for
Retrieving data ...