cancel
Showing results for 
Search instead for 
Did you mean: 

Steps for History Write in Tag Query

Former Member
0 Kudos

I need to write value into my Tag server.

If i use CurrentWrite I can able to write the value with current date time.

I need to write it with previous date time(i.e.) the date time past to current.

I guess it can be done by using HistoryWrite.

I dont know how to give input datetime in HistoryWrite.

Kindly help me.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

What vendor's Historian/Tag Server are you using?

What MII version and build are you using?

What are you using as the connection bridge between MII and your Historian (UDS or PCo and which version)?

Does your Historian even allow modifications to historical data (some do not)?

Does your ID for Historian access have permission to modify historical data?

Please provide this additional information. There will be other questions coming after these basic questions are answered, but there are a lot of folks who have experience with Historians/Tag Servers.

Regards,

Mike

Former Member
0 Kudos

My Historian vendor is OSI-PI.

MII Version 12.1 and Build 24

Connection Bridge is PCo

Yes my historian will allow historical data modification and i am having write access also.

I cannot able to test historical write since i dont have idea of how to give datetime input.

Regards,

Selva

Former Member
0 Kudos

You might look into using another connection type to the historian, since the MII TagQuery template does not have a HistoryWrite MODE to be applied in this case (at least our MII 12.1.8 Build 30 doesn't show one).

The OSI-PI package contains an OLE-DB connector. By setting up an OLEDB connectivity through UDS/PCo you will be able to access/modify history data using regular SQL queries.

However, please pay attention on the specific time abbreviations used by OSI-PI (i.e. * = now, *-1h = one hour ago, etc) since they're a little different from the ones used generally with standard ANSI SQL.

cheers,

paul.

0 Kudos

Hi Paul,

Haven't heard from you in a while. Good to see you posting.

Hi Selva,

I think Paul is right regarding the writing of History data for OSIsoft's PI Historian. Even doing it from within the historian is not meant to be quick and simple (most process engineering folks don't like historical data being changed without very, very good reason).

Try setting up an OLEDB connection in MII thru PCo using Legacy mode. If you are using UDS, then you may need to install UDS 4.0 (not UDS 2.5) and will probably also have to install the OSIsoft PIOLEDB files on the server where PCo/UDS is installed, but read the configuration guide to be sure.

If you have contacts with OSIsoft, you may want to touch base with them on how to approach the HistoryData update process. I can ping some folks if you do not have any contacts. Let me know.

Good luck,

Mike