drausim127@spiratec

Use Function Values in PI ACE Calculation

Discussion created by drausim127@spiratec on Jun 24, 2013
Latest reply on Jun 25, 2013 by Marcos Vainer Loeff

Hello,

 

I'm just writing a little ACE-Calculation were I want to analyze the archive values of an input tag like cdt158. For this I have seen that a function Values is available but I'm not able to use it.

 

My development system is PI Server 2010 and PI SDK 1.4.2.455. Dot Net version is 4.0 (for this I have created a file with name "PIACECLassLibraryHost.exe.config") When I write the following code I always get two error message:
1.) Type 'PISDK.PIValues' is not defined
2.) Reference required to assembly 'OSIsoft.PISDK, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c3309f0734ba2805' containing the type 'PISDK.PIValues'. Add one to your project.

 

Public Overrides Sub ACECalculations()
   Dim values As PISDK.PIValues
   values = Me.Gen_UnitBatchActive.Values(DateTime.Now.AddDays(-7), DateTime.Now)
End Sub

 

I understand error message No.1. Reason was that I haven't referenced PISDK in that project. So I have added reference OSISoft.PISDK (version 1.4.0.0) from the .NET tab. After this action error message No.1 and No.2 still appears. When I double checked my references I have seen a error message for the reference OSIsoft.PISDK

 

The location of this reference is D:\PIPC32\SDK\PublicAssemblies. I have checked the location and a library is located at this folder.

 

Does anyone have an idea why this happens?

 

Best regards Markus

Outcomes