AnsweredAssumed Answered

odbc auto recovery

Question asked by Hans_Drost on Feb 6, 2018
Latest reply on Feb 21, 2018 by gmichaud-verreault

Hello PI square,

 

I am working on an ODBC interface with IP21.

For this connection, we have 2 functions available on the IP21 side:

- Get_Values(tagname, begin_time(optional), end_time(optional))

- Get_values_all()

 

The first function can give back a certain time range from the IP21 tag values, where as the second function gives back the current values of all tags.

Both functions work correct for current values. I use a distribution tag for the second function and a variable for the second function (P1=AT.TAG for each tag, no start/end time).

 

I would like to have some sort of "auto recovery" type of implementation.

I thought this would work with the Recovery Parameters recovery mode "TimeStamp". Setting one of the tags that has the highest scanclass as the timestamp tag.

This should, as far as I understood, get the timestamp of the last value from that tag and fill a variable (TS) in the first functions begin_time.

It seems that this does not work that way. It wants a datetime tag, which I can fill with a analytics by getting the latest timestamp of one of the tags.

 

Is this how I should go about this, or is there a different "better" way of solving this?

 

Kind regards,

 

Hans Drost

Outcomes