Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Time of MaxRun


ccowin Sep 27, 2019 08:22 PM

Is it possible to extract the time at which the the max number from the maxrun funtion was calculated?


Makada Sep 28, 2019 11:24 AM

Heres an example i use.

Timestamp(MaxRunOverTimeWithReset("Server:CR1000.Table1.AirTC_Avg",TimeStamp("Server:CR1000.Table1.AirTC_Avg"), nsecperhour))


jtrauntvein Sep 28, 2019 03:20 PM

If you are referring to the CRBasic instruction.  It operates on an array of values and there are no corresponding timestamps that the instruction could use.  Your program logic would have to do this based upon the position of the max value.  

If this sounds too complicated, you could consider using a data table with the Maximum output instruction and appropriate parameters to produce the time of max.  Your program can access the result using the Table-name.Field-name syntax.


ccowin Sep 30, 2019 03:17 PM

Jtrauntvein can you please elaborate?

I've tried finding those instructions and there is nothing coming up in the Editor that represents the expressions you described. How do I use Table-name.Field-name? I found FieldNames function but it looks like it just adds a description to a field name which I dont think is what I'm looking for.

This program will be in Cr1000x's


jra Sep 30, 2019 03:32 PM

ccowin take a look at: https://www.campbellsci.com/blog/programmatically-access-stored-data-values for help with the tablename.fieldname syntax. 

Log in or register to post/reply in the forum.