AnsweredAssumed Answered

Error getting Summaries2 value to output

Question asked by Syncrude on Feb 20, 2018
Latest reply on Feb 21, 2018 by Rick Davin

I am getting the string "System._ComObject" written to the debug output.  Any suggestions to correct the error?  I want to output the named value for any of "Average", Maximum", etc.

 

Thanks for your help.  Apologies for the text code post, I am not sure how to post where the line numbers, etc. appear.

 

Thanks for the patience with a newbie.

 

 

System;


System.Diagnostics;


PISDK;


PISDKCommon;



class PiFunctions


// Start and end time


public string piStartTime;

 

public string piEndTime;

 

public string duration;

 

//PI Tag, value and server


public string piTag;

 

public string piValue;

 

public string piServer;

 

public int piSummaryMethod;

 

int i; PISDKCommon.NamedValues nvsSum;

 

string starttime = "10/26/2009 10:00:00";

 

string endtime = "10/25/2009 10:00:00";

 

string interval = "1D";

 

public PiFunctions(string currentPiServer)

 

"";

 

"";

 

"";

 

"NONE";

 

"-1.0";

 

public string piSummary(string currentPiServer, string currentPIStartTime, string currentPIEndTime, string duration, string piTag, string piSummaryMethod)

 

new PISDK.PISDK();

 

string sqlString = "tag=" + "'" + piTag + "'";

 

// IPIData2 interface and namedValues storage for filtered values result 


new PISDKCommon.NamedValues();

 

// summary values 


// Set method for namedValues 


//Recorded values


string.Empty, FilteredViewConstants.fvShowFilteredState, null);

 

//Get the desires archive value


object o = "Average"; // piSummaryMethod;


ref o).Value;

 

return valsum.ToString();

 

Outcomes