Not exactly.
Client Side you can fire a Macro with Login.
I always create a LOCAL HMI user named
HMI_Default with password
HMI_Default that has nothing but "view only" permissions (as governed by
CurrentUserHasCode() functionality.
Then instead of "logging out" I just run
Code:
login HMI_Default HMI_Default
Where the syntax is
login username password
If you want to do this event based on a per client basis, then you will need to do a bit of VBA code to make sure things are executed client side.
The best way to do this is to have a background screen that runs on each client that holds VBA code. Here is a copy and paste of my post from this thread, slightly altered for you. -->
http://www.plctalk.net/qanda/showthread.php?t=92425
====
You can run an EVENT file that will execute things "globally" (from the server). However, lots of commands CANT be ran - because they don't know where to execute. Example - "Display XYZ" can NOT be ran from an EVENT file because it doesn't know where to execute.
Generally I have a "background" screen that runs on all clients that is cached and running in the background.
To your startup macro add the following:
Display BackgroundScreen /ZA
Then have all of your code on the BackGroundScreen.
Hope that helps.
===
On the BackGroundScreen, have a Numeric Display that points to the PLC Tag for timer for screen, or condition, or whatever you want.
Expose the Numeric Display to VBA Code
Have your code say:
Code:
Private Sub NumericDisplay1_Change()
On Error GoTo ErrorHandler
If Not IsError(NumericDisplay1.Value) Then
If (NumericDisplay1.Value = 1) Then
ExecuteCommand ("Display Name_Of_Window")
End If
End If
ErrorHandler:
Exit Sub
End Sub
You can change the ExecuteCommand to fire a macro, or even do the login directly. Examples are:
Code:
If (NumericDisplay1.Value = 1) Then
ExecuteCommand ("login HMI_Default HMI_Default")
End If
Code:
If (NumericDisplay1.Value = 1) Then
ExecuteCommand ("MacroName")
End If
Hope that helps!