4 Replies Latest reply on Mar 28, 2018 2:59 AM by Muthulingam-EnQuest

    How to run 2 instances of PI ProcessBook Pages (One Slideshow of 2 Pages and another Page) onto 2 different Screens from the same Machine?

    Muthulingam-EnQuest

      How to run 2 instances of PI ProcessBook Pages (One Slideshow of 2 Pages and another Page) onto 2 different Screens from the same Machine? (I feel like Montgomery Scott right now)...

       

      I have one PI System Slideshow Page which currently Opens and Cycles another 2 PI ProcessBook Pages, named Page A and Page B  in "Full Screen" in a timed Cycle onto Screen No. 1.

      PM8E Parameters Slideshow 1.PNGPM8E Custody Meter Flow 2.PNG

      This PI System Slideshow Page is then killed by a PI ProcessBook Kill Command later at night and then restarted again the next morning by a PI ProcessBook Launch command.

      I had to do this to Cyclically refresh the PI System Slideshow Page to avoid certain Pop Up Messages and Errors Messages which keeps Popping Up if we run the PI ProcessBook Pages continuously overnight.

      The client wants another PI ProcessBook Page, Page C in "Full Screen" onto Screen No. 2.

      PM8E PVDS 3.PNG

       

      My questions:

      1. Can I run these 2 Instances in "Full Screen" from the same Machine onto 2 Screens?
      2. How would the Kill and Launch Command affect these 2 PI ProcessBook Instances in "Full Screen" running from the same machine?
      3. Are there any other options to do this from the same Machine?

       

      Ganesh Supromaniam

       

      Best regards,

       

      Muthulingam Ramiah

        • Re: How to run 2 instances of PI ProcessBook Pages (One Slideshow of 2 Pages and another Page) onto 2 different Screens from the same Machine?
          kduffy

          Hi Muthulingam,

           

          1. Having two copies of ProcessBook open, one on each monitor, in full screen mode is perfectly fine. You can launch ProcessBook either from the start menu or by calling the image name from a command prompt. Then once one instance is open, repeat the process to open the second one.

           

          If you're having problems with this part, could you supply us with the exact steps or commands you're using to open ProcessBook (including bat file scripts, VBA in the Display_Open() event handler, etc).

           

          2. For the kill command, are you using taskkill? If so, using the /IM filter will close all processes with that image name (Procbook.exe in this case), so this command will kill both instances:

          taskkill /IM Procbook.exe /F
          

          Instead, if you use the /PID filter, it can close one instance without touching the other one. For example:

          tasklist | find "Procbook.exe"
          taskkill /PID 4108 /F
          

          I'm not sure how to detect which instance, though, is which PID.

           

          For the launching, as I mentioned above, running the launch command twice (with enough time in between to allow the first instance to fully open) should work. If you're trying to launch them and not have to manually move them to different monitors, then there are applications like cmdow.exe that should be able to do this (disclaimer: I have not use this personally and cannot verify that third party programs such as this are safe to use).

           

          3. I would say that another option would be to let us know the error messages you get when running ProcessBook for extended periods of time. It might be a simple fix that allows us to implement something else.

           

          Kelsey

          2 of 2 people found this helpful
            • Re: How to run 2 instances of PI ProcessBook Pages (One Slideshow of 2 Pages and another Page) onto 2 different Screens from the same Machine?
              Muthulingam-EnQuest

              Hi Kelsey, thank you for such an in-depth response.

               

              My replies are in Underlined Fonts below:

               

              1. Having two copies of ProcessBook open, one on each monitor, in full screen mode is perfectly fine. You can launch ProcessBook either from the start menu or by calling the image name from a command prompt. Then once one instance is open, repeat the process to open the second one.

              If you're having problems with this part, could you supply us with the exact steps or commands you're using to open ProcessBook (including bat file scripts, VBA in the Display_Open() event handler, etc).

              OK noted, will try this out and let you know later.

               

              2. For the kill command, are you using taskkill? If so, using the /IM filter will close all processes with that image name (Procbook.exe in this case), so this command will kill both instances:

               

               

              1. taskkill /IM Procbook.exe /F 

              Instead, if you use the /PID filter, it can close one instance without touching the other one. For example:

               

               

              1. tasklist | find "Procbook.exe" 
              2. taskkill /PID 4108 /F 

              I'm not sure how to detect which instance, though, is which PID.

              Ok noted, but I would like to kill all Procbook Pages and restart them both again daily to refresh the Page in order to reflect any Format or Tag Updates/ Changes made to them.

               

              For the launching, as I mentioned above, running the launch command twice (with enough time in between to allow the first instance to fully open) should work. If you're trying to launch them and not have to manually move them to different monitors, then there are applications like cmdow.exe that should be able to do this (disclaimer: I have not use this personally and cannot verify that third party programs such as this are safe to use).

              Noted on the Time difference and I will explore the cmdow.exe option as you've suggested. This is my main concern at the moment, I need to move one of the Pages (in Full-screen Mode) to the 2nd Monitor while maintaining the other 2 ProcBook Slideshows which is also running in Full-screen Mode. I will let you know if it works.

               

              3. I would say that another option would be to let us know the error messages you get when running ProcessBook for extended periods of time. It might be a simple fix that allows us to implement something else.

              There were a variety of error messages:

              - sometimes Team Viewer Pop Ups (I've disabled this weekly Alert Pop Up and the problem has been resolved)

              - sometimes the Pop Up Error Message says "Can't find Title1.pdi ProcBook page" after running for more than 24 or 48 hours (the problem went away with Daily Procbook Kill and Re-Launch Command)

              - I need to restart the PI ProcBook Instances to refresh any Format or Tag Updates/ Changes made to them

               

              Thank you again Kelsey. Will keep you updated.

               

              Best regards,

               

              Muthulingam Ramiah

                • Re: How to run 2 instances of PI ProcessBook Pages (One Slideshow of 2 Pages and another Page) onto 2 different Screens from the same Machine?
                  Muthulingam-EnQuest

                  Hi Kelsey,

                   

                  We've decided not to use "cmdow.exe" at the moment and got a second desktop instead to run the second Large Screen TV.

                   

                  Here's the VBA Script that I currently use to Open and Cycle the PI ProcessBook Pages in a Loop (in Full Screen Mode):

                   

                  Public Sub Display_Open()

                      Dim PauseTime, Start, Finish, TotalTime

                      Dim x As Display

                     

                      Set x = Application.Displays.Open("\\klpi01\Graphics\PM8E-PVDS.pdi", True)

                      x.Zoom = "FitAll"

                      'testa = x.Scroll(0, 0)

                      Application.FullScreen = True

                     

                      Set x = Application.Displays.Open("\\klpi01\Graphics\SEBWellheadMonitoring.pdi", True)

                      x.Zoom = "FitAll"

                      'testa = x.Scroll(315, 0)

                      Application.FullScreen = True

                             

                  10  Set x = Application.Displays.Open("\\klpi01\Graphics\PM8E-PVDS.pdi", True)

                      'Starts the First loop

                      PauseTime = 40    ' Set duration.

                      Start = Timer    ' Set start time.

                      Do While Timer < Start + PauseTime

                          DoEvents    ' Yield to other processes.

                      Loop

                      Finish = Timer    ' Set end time.

                     

                      Set x = Application.Displays.Open("\\klpi01\Graphics\SEDWellheadMonitoring.pdi", True)

                      'Starts the Second loop

                      PauseTime = 5    ' Set duration.

                      Start = Timer    ' Set start time.

                      Do While Timer < Start + PauseTime

                          DoEvents    ' Yield to other processes.

                      Loop

                      Finish = Timer    ' Set end time.

                     

                      GoTo 10

                      'ThisDisplay.Close (False)

                  End Sub

                   

                   

                  This makes it appear as if the Pages are running in Slideshow mode:

                  Let me know your thoughts on this.

                   

                  Best regards,

                   

                  Muthulingam Ramiah

                   

                   

                  John Messinger's Blog

                  Ganesh Supromaniam

                  Muthulingam Ramiah

                • Re: How to run 2 instances of PI ProcessBook Pages (One Slideshow of 2 Pages and another Page) onto 2 different Screens from the same Machine?
                  Muthulingam-EnQuest

                  Hi Kelsey,

                   

                  We've decided not to use "cmdow.exe" at the moment and got a second desktop instead to run the second Large Screen TV.

                   

                  Here's the VBA Script that I currently use to Open and Cycle the PI ProcessBook Pages in a Loop (in Full Screen Mode):

                   

                  Public Sub Display_Open()

                      Dim PauseTime, Start, Finish, TotalTime

                      Dim x As Display

                    

                      Set x = Application.Displays.Open("\\klpi01\Graphics\PM8E-PVDS.pdi", True)

                      x.Zoom = "FitAll"

                      'testa = x.Scroll(0, 0)

                      Application.FullScreen = True

                    

                      Set x = Application.Displays.Open("\\klpi01\Graphics\SEBWellheadMonitoring.pdi", True)

                      x.Zoom = "FitAll"

                      'testa = x.Scroll(315, 0)

                      Application.FullScreen = True

                            

                  10  Set x = Application.Displays.Open("\\klpi01\Graphics\PM8E-PVDS.pdi", True)

                      'Starts the First loop

                      PauseTime = 40    ' Set duration.

                      Start = Timer    ' Set start time.

                      Do While Timer < Start + PauseTime

                          DoEvents    ' Yield to other processes.

                      Loop

                      Finish = Timer    ' Set end time.

                    

                      Set x = Application.Displays.Open("\\klpi01\Graphics\SEDWellheadMonitoring.pdi", True)

                      'Starts the Second loop

                      PauseTime = 5    ' Set duration.

                      Start = Timer    ' Set start time.

                      Do While Timer < Start + PauseTime

                          DoEvents    ' Yield to other processes.

                      Loop

                      Finish = Timer    ' Set end time.

                    

                      GoTo 10

                      'ThisDisplay.Close (False)

                  End Sub

                   

                   

                  This makes it appear as if the Pages are running in Slideshow mode:

                  Let me know your thoughts on this.

                   

                  Best regards,

                   

                  Muthulingam Ramiah

                   

                  Kelsey Duffy

                  John Messinger's Blog

                  Ganesh Supromaniam

                  Muthulingam Ramiah