8 Replies Latest reply on Feb 6, 2018 8:14 AM by EMEAManufacturing

    PI tag creation with its value as a timestamp

    EMEAManufacturing

      I want to create a PI point which will give me its value as its timestamp whenever a data is collected in PI data archive.

      Can anybody help me out with this?

        • Re: PI tag creation with its value as a timestamp
          rschmitz

          Hi Jayakumar,

           

          Thanks for reaching out to us on PI Square.

           

          To make sure I understand what you're looking for, you would like to have a tag which holds the timestamp of the most recently updated point on the PI Data Archive, is that correct? I don't believe there's a way to do this natively on the Data Archive, but perhaps if you can elaborate on your use case we may be able to find another way of accomplishing your goal here.

           

          Cheers,

          Rob

            • Re: PI tag creation with its value as a timestamp
              EMEAManufacturing

              Robert,

              What I am looking for is to have a tag which shows its value as a 'timestamp' whenever it is getting data from OPC.

              Its just that rather than showing its value and corresponding timestamp in data archive for a tag, I want that tag just to show timestamp in its list of values.

              You can see above when I check the data for a tag in archive editor in PI SMT, It shows value and corresponding event time, but what I am aiming for is to create a tag which shows Event time as its value directly ( e.g., just a single column in above case).

                • Re: PI tag creation with its value as a timestamp
                  rschmitz

                  Jayakumar,

                  There is not a way to have a tag with events that have a timestamp and no value. That being said, if you're looking to monitor that an interface is sending data you have a couple of options to do so.

                  1. Most common interfaces from OSI have Heartbeat tags which confirm an interface is connected to the Data archive and updates once every second.
                  2. Most common interfaces from OSI have device status tags which can tell you if there is an issue connecting to the Data Source.
                  3. You're best at an "all-in-one" tag (although I recommend monitoring all of them) would be an I/O rate tag, which monitors the number of bytes written by the interface to the Data Archive. This lets us know a few things: the data source can communicate with the interface, the interface can communicate with the Data Archive, and that there is actually data flowing to the Data Archive (not just that the network is up).

                   

                  All of these tags are configuration from the UniInt > Health Points tab in the ICU

                   

                   

                  You can use any of the OSI's Visualization tools to have a tag display it's timestamp with the value.

                   

                  Cheers,

                  Rob

                  1 of 1 people found this helpful
              • Re: PI tag creation with its value as a timestamp
                afink

                Jayakumar,

                I agree with Robert Schmitz, what exactly is the use case or problem you are trying to solve?  If you are trying to monitor if you are consistently getting real-time data, another approach would be to create a performance counter tag for the "PI Snapshot Subsystem_Snapshots/sec" and then create an analysis that would check if the value is zero for more than perhaps a few minutes.  This could then leverage PI Notifications Service to send an email when the condition occurs.

                 

                A less graceful option could also utilize the "Last Modified Time" property of the primary archive file to help determine that real-time data is being collected, however keeping in mind that backfilling to the primary archive time range would also effect this and also that the header is only updated periodically every couple minutes.

                 

                - Adam

                1 of 1 people found this helpful
                  • Re: PI tag creation with its value as a timestamp
                    EMEAManufacturing

                    Adam,

                    What I am looking for is to have a tag which shows its value as a 'timestamp' whenever it is getting data from OPC.

                    Its just that rather than showing its value and corresponding timestamp in data archive for a tag, I want that tag just to show timestamp in its list of values.

                    You can see above when I check the data for a tag in archive editor in PI SMT, It shows value and corresponding event time, but what I am aiming for is to create a tag which shows Event time as its value directly ( e.g., just a single column in above case).

                      • Re: PI tag creation with its value as a timestamp
                        sraposo

                        Hi Jayakumar,

                         

                        This isn't possible. PI Points cannot have a value without a Timestamp.

                         

                        A possible workaround for you would be to use AF Analytics to retrieve the Timestamp of your PI Point and output the Timestamp into another PI Point with a value type of DateTime. This would result in a PI Point that has a timestamp value and an associate timestamp. Let us know if you need more information on how to do this.

                         

                        Thanks,

                        Seb

                        • Re: PI tag creation with its value as a timestamp
                          TimCarmichael

                          As others have said, every PI tag MUST have a timestamp; what the value is depends on the type of data desired.

                          For the PI tag being received from the OPC server, there is the timestamp of the event and the value.

                          If you need a tag to have the timestamp as the value, you can create another tag such as an event based performance equation to have the timestamp as the value. Whenever the source point from the OPC tag is updated, the 'timestamp' tag will be updated as well.

                           

                          Not sure of the reason for doing this, but it can be done.

                          1 of 1 people found this helpful