It is currently Sun Aug 31, 2014 11:34 pm

Post new topic Reply to topic  [ 5 posts ] 
 Slide Show 
Author Message

Joined: Tue Oct 09, 2007 6:54 am
Posts: 2
Post Slide Show
I have a need for a demo screen mounted on a wall that needs to show a slide show of random or predesigned selections of a projects windows. What is the best way to accomplish this. Also a non logged in viewer may need to be able to use the screens.

Darrel @

Tue Oct 09, 2007 7:01 am

Joined: Wed Apr 18, 2007 11:00 am
Posts: 645
Location: Sacramento Ca.

There are a couple was to do this, but it sounds like your best bet is to have a link somewhere in your project to close all windows and open one small window with a timer and start/stop buttons. Set the buttons to toggle the "running" property on the timer. Then set the timer maximum to the number of windows you will be cycling through, and the delay to however long you want to pause at each screen. In the timer event configuration under propertyChange, put the following:

#list of windows to cycle through
windows = ["Window 1", "Window 2", "Window 3"]

if event.propertyName == "value":
   i = event.source.value
   #close the previous window
   if event.source.value == 0:
   #open the next window

You can also add items to the runtime menu to start and stop it for you. Something like
#open the window if it isnt open
#reset the value so you start at window1
#start it running

Hope that helps!

Robert McKenzie
Inductive Automation
Technical Support

Tue Oct 09, 2007 10:33 am
Profile WWW

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 4053
Location: Sacramento, CA
Darrel, here is another way of doing it with a global timer script. In this way, it is totally automatic - the timer script senses if a user is active using the fpmi.system.getInactivitySeconds() function. Just put the list of window names you want to swap between in the windows variable. (Note - you need FactoryPMI 3.0 to use this script because of the use of the fpmi.nav module)

Put this script in a global timer script that runs every 15,000 milliseconds. It won't run the slideshow if the user has been active in the last 10 seconds. You can play with the timing to get the effect you want.

windows = ['Window 10', 'Window 11', 'Window 12', 'Window 13']

seconds = fpmi.system.getInactivitySeconds()
if seconds > 10:
   global position
      position = (position + 1) % len(windows)
   except NameError:
      # This will initialize it the first time


Carl Gould
Co-Director, Software Engineering
Inductive Automation

Tue Oct 09, 2007 11:14 am
Profile WWW

Joined: Mon May 28, 2012 4:34 pm
Posts: 14
Post Re: Slide Show
I used the example shown above to change display. However, the swapwindow() method did not work. It did not clear the old windows from the display. The new windows showed up to the right of old window. I had three windows in my project. After two timer intervals, all three windows were showing on the screen. So, I ended up using the function calls closewindow/openwindow. Is there any window property that needs to be set to make the swapwindow() method work.

Sat Jun 09, 2012 9:50 am

Joined: Tue Mar 24, 2009 9:14 am
Posts: 880
Location: Hudson, MI
Post Re: Slide Show
Look at the help file for the swapTo method. :)


Duct tape is like The Force. It has a light side, a dark side, and it holds the universe together.

Mon Jun 11, 2012 10:25 am
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: