1 Reply Latest reply on Aug 12, 2016 4:23 PM by gregor

    Microsoft List Box does not hold old values


      I have a task that I am performing however I have some questions, hopefully you can guide me and answer a few of my questions.


      First, I am using the control tool to add a Microsoft List Box to display the timestamp and value every time the PI Point updates.  However, I noticed that every time I close Pi Processbook, and re open it OR sporadically it will delete the previous recorded values.  My goal is to have this list as a running historian, without having values deleted.  How can I do this?


      Next question is I would like to write some code, that when a number turns from 1 to 0 (here let’s say inverter status with 1 being ON), it will bring up the inverter name and timestamp of when the inverter went off.

        • Re: Microsoft List Box does not hold old values

          Hello and welcome Christopher!


          1. You will need to persist the content of the ListBox item in a file or database when the user closes ProcessBook (e.g. in the Display.BeforeClose event) and initialize the ListBox control when a user opens the display (e.g. in the Display.Open event).
          2. This sounds like a standard use case which doesn't require any coding. You could use a PI point of type Digital to store the status information. Within ProcessBook, you would use a Value symbol, assign the Tag and chose the position (Left, Right, Top, Bottom) to show the Timestamp.