AnsweredAssumed Answered

Write Data from Datalink to PI Server - IMD Tags

Question asked by NoéAlvarado on Aug 22, 2018
Latest reply on Sep 25, 2018 by anogueira

Hi to all

I have a macro to write tags from Datalink to Excel. I am using a String Datatype to write some comments of the shift. The problem that I have is that I don´t know how to limit the period of time of comments.

For example:


TAG "String1" values:

- 08:00 - 09:00     --> "The SAG Mill has been stopped".

- 13:00 - 14:35     --> "Problem with the pump XX".

When I write this values to the tag I write on the macro the first value. For example

     Write "The SAG Mill has been stopped" to 'String1' at 08:00.

After that I write the next Value:

     Write "Problem with the pump XX" to 'String1' at 13:00.


The macro is working, the problem that I have is how to finish the first value at 09:00 or 14:35. I tried to write 'String1' value at 09:00 to "NoOutput()" but doesn´t work, I want to have "No Data", because I didn´t have any event there, just like the "No Data" that I have when I created the tag. When I write "NoOutput()" this can give me problems with some calculations and also doesn´t look well on trends.

Please can someone help me with this?