Jaiiyer

Closing NA pop up window automatically

4 posts in this topic

Hi,

is it possible to close the sysmac studio popup window automatically without the press of any button? basically after the pop up window is opened for certain amount of time the window closes by itself. 

Share this post


Link to post
Share on other sites

Yes, with VB script. There are a few ways but I would personally run a Global subroutine every second, in that subroutine you establish a time (in seconds) at which you force a screen change. In this example if the popup is the current page the script will force a screen change to "Main" after 270 seconds:

Sub popTimer
	
	If _HMI_CurrentPage = "Popup" Then
		accum = accum+1
		If accum >270 Then
			_HMI_CurrentPage = "Main"
		End If
	Else
		accum = 0			
	End If
End Sub

 

 

1 person likes this

Share this post


Link to post
Share on other sites

I found a way to do it. Set a variable when the page is open (lets call it PAGEOPEN). Use global events to monitor PAGEOPEN and a onesecpulse variable from PLC(i used Get1sClk block) and increment a local variable. And when the local variable goes beyond certain number you can close the page it in global events and reset the variable

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now