9 Replies Latest reply on Mar 18, 2015 7:55 AM by mschuldlos

    Customize Processbook Plot of an ODBC dataset




      I'm creating a Processbook Trend with two traces having ODBC datasets from an MSSQL Server as data source. The time range on the x Axis comes from a Subbatch within a PI Unit Batch, so the last value in the ODBC Dataset is typically within the timerange.

      Is it possible to suppress the horizontal line after the last value of each dataset? I already tried to add a NULL value one second after the last valid value within my query, but this works only for the trace with the latest timestamp in the trend, the other one still has a short horizontal line at the end.

      I didn't find a configuration option to change this behaviour. Any Idea?

        • Re: Customize Processbook Plot of an ODBC dataset

          Hi Markus,


          how much control do you have over the ODBC data source? Is it possible to add a "ghost" null event for each time series? This will suppress the horizontal line for each time series, as shown below.





          This requires some intervention on the data source side, and affects some data integrity. For example, Value=4 at 3:00:01 is not the true interpolated value. It will also present issues if events after added after the null event, so the change is merely for visual/cosmetic reasons.


          What physical quantities do the trend values represent? Is there any physical meaning to the values during the time period of the horizontal lines? If the data is in the PI Archives, it may be possible to use PI BatchView add-in to visualize the data but it will depend on if the time-series is a continuous stream or batched stream.

            • Re: Customize Processbook Plot of an ODBC dataset

              Hi Barry,


              thanks for your quick reply. I have already tried the ghost nulls at the end of the datasets. It works perfectly for the trace with the latest timestamp, but if there is anotherone with less values the trace is filled with a horizontal line up to last timestamp of the first trace (see the last picture in my question).


              I have also tried to get all traces within one dataset, but in this case I get null values within the dataset and these null values are shown as gaps in the trace.


              The values I want to show belong to a batch and are manually measured and stored in the database, not in PI. What I want to achieve is:

              • All existing values for a trace are shown in the trend with lines between them
              • No extra lines after the last value of each trace.


              I have full control over the SQL server and the PI server

                • Re: Customize Processbook Plot of an ODBC dataset

                  Hi Markus,


                  Are you only plotting the data from the SQL Server in this case? If so, you might consider turning on the Markers option in PI ProcessBook for this trend. This will only plot the actual values returned in your query.



                  Laurie Dieffenbach

                  Product Manager

                    • Re: Customize Processbook Plot of an ODBC dataset

                      Hi Laurie,


                      Markers are already turned on for the Trend. The only difference I can see when I turn them off is that the markers are set between the measured points. The trace line looks exactly the same.




                        • Re: Customize Processbook Plot of an ODBC dataset

                          Hmmm....maybe this will help....


                          In the PI ProcessBook 2015 Beta, we've made some changes to how we trend values. In the image below (made with this Beta and the data you show above, from Excel), You can see that only the existing values are plotted. Furthermore, the legend shows "No Data" because at the time I took the screenshot, there is no data for the "current" time and there are no values for these traces at the end of the plot.


                          Do you think this presentation will give you what you're after? (BTW, the dotted lines are not representing "now", I just made the major time gridlines dotted so they stand out). Also, the X markers indicate where the data is reported as NULL.