4 Replies Latest reply on Jul 16, 2014 3:33 AM by thomas.clchan

    Plot Processbook Trend using Tag with point type 'String'

    thomas.clchan

      Dear all,

       

       

       

      I have some pi tag with point type 'String' like below but the graph shows unexpected result. Actually I would like to plot the trend using the time and the value excluding ';'. Is there any way to do so? Thank you.

      15-Apr-14 18:15:00 10.209000;
      15-Apr-14 18:16:00 10.209000;

       

      1667.Capture1.PNG

       

       

       

       

        • Re: Plot Processbook Trend using Tag with point type 'String'

          Hello Thomas,

           

          The value looks like it could be of type float. What's the reason for storing string values?

           

          What DataSource / interface are those string values coming from?

           

          When trending values of type string, unique strings are considered equal but there's no logic comparing or checking if values can be somehow numeric. You might be able using a DataSet in ProcessBook to remove semicolons and translate string values into floats but the better option would be to store values with a tag of type float.

            • Re: Plot Processbook Trend using Tag with point type 'String'
              thomas.clchan

              Hello Gregor,

               

              Those values are come from PI Server which stores value detected by some sensors. We add semicolon to handle exceptional case like "-4;error"

               

              We would like to try the approach on removing semicolons using DataSet in ProcessBook to get back the floating number. Is there any sample to do so?

               

              Thank you.

                • Re: Plot Processbook Trend using Tag with point type 'String'

                  Hello Thomas,

                   

                  Storing values and quality information into a string tag helps you to save PI tags but is more expensive with regards to memory consumption, has negative impact to Expression and Compression and because of both is has negative impact on the performance. In addition you need to treat data before being able to visualize them as your example with trending the data illustrates. I see a single advantage but a lot of disadvantages and hence recommend avoiding string data type if possible.

                   

                  Some OSIsoft interfaces allow to store value and quality information to different tags e.g. values with their native data type and quality information as Digital data type.

                   

                  Performance Equation Syntax is used with ProcessBook Data Sets. Please refer to PI Performance Equation Reference Manual (%PIHOME%\Help\PEReference.chm). Function Float converts a string into a number. InStr can be used to locate the first occurrence of a sub string. Functions like Left, Right and Mid can be used to retrieve substrings.