Factory Talk View Studio SE - Auto Login/Logout

travisroberts88

Lifetime Supporting Member
Join Date
Aug 2017
Location
Navarre, Ohio
Posts
34
I will try to clarify this as well as I can here and can do my best to clarify further if needed.

I have a plant where I have about 5 or 6 areas. The plant has all SE screens and a main menu. Certain users can access the entire plant of screens, others have access to the specific area. The unique situation I have is this, if a supervisor or engineer log in and either logout, or auto logout the DeskLock application after a set number of minutes, I want the startup macro login to login again. For example, if the supervisor logs in to the filler area, logs out (or auto logout on versaview after 5 minutes) I want the FillerArea startup macro (or FillerArea login macro if needing to make another) to run and then trigger a login for the FillerOperator user. This would also be in each other area. The main thing here is that there is only one header screen with the Login Logout buttons. Essentially I want the login button to run a macro on the specific client since I am working with 5 or 6 areas, with about 4 screens or more in each area.
 
http://www.plctalk.net/qanda/showthread.php?t=95319

The above thread may help you out.
Regards,

I did see this, I don't think it is what I am looking for. I don't want to to log into a "view only" user. I actually want to to log into one of 6 startup macros I created. This is because each area has different permissions. So Filler would logout and log in as the FillerOperator, capping would logout and log in as CappingOperator on two different sides of the plant. There is only one main menu with one Logout button that would need to do this so I don't have a ton of screens. Pretty much I wish in the SE environment in studio I could have the Logout button run the action of Login (startupmacro"x") where it would be Login FillerMacro or Login CappingMacro, etc. I can tell it to Login operator operator but I don't want it to do that sadly. I want it to login the macro that is on the specific client, as in, I want the Logout to Login a user on that particular client that is the default for the client, not the screen.
 
You'll probably need to get VBA involved. FTView can't tell which client it's running on - you'll need to use VBA to get the PC name, and use that to decide which macro to run
 
You'll probably need to get VBA involved. FTView can't tell which client it's running on - you'll need to use VBA to get the PC name, and use that to decide which macro to run

Any idea what command grabs that PC name. Application.GetHMIServerComputerName is the only one I can think of that utilizes computername in its call, but this does not work.
Example of my code would be:

NOTE: THIS IS USING THE RSVIEW32/SE IDLE DETECT CONTROL ACTIVE X CONTROL

Private Sub RSView32SEIdleDectectControl1_EnterIdleState()
Dim computername As String
computername = <The function to grab the computer name>
Select Case computername

Case "<Computer namehere(ie. Client2 [full qualification if needed])>
Select Case CurrentUserName()
Case "Supervisor"
Application. Login "username", "password"
Application.LoadDisplay "Main Menu"
Case Else
End Select
Case <Second computer here(ie. Client4 [full qualification if needed])>
Select Case CurrentUserName()
Case "Supervisor"
Application.Login "username2", "Password2"
Application.LoadDisplay "Main Menu"
Case Else
End Select
Case Else
End Select

This gives me one master supervisor user name that no matter what client I am on I can auto logout to that clients specific login credentials.
I can accomplish this if I make multiple usperviosr accounts and have the case be dependent on the user logged in. But I want it dependent on the client it is on. I.E. If supervisor is on client4, after the activex timeout of 30 seconds, it auto logs in as usernamex and passwordx
 
We were able to sort this out. The embedded commands hardly work in the FTV environment, shocking I know!
Here is an example of how I worked around it in VBA:

Dim compname As String
compname = Environ$("computername") 'We use the Windows environment variable "computername" to resolve the name of the device that's running our code. It is accessed via the Environ$(string environmentVariableName) function.

Select Case compname

Case "Client4"

Select Case CurrentUserName()
Case "supervisor"
Application.Login "operator", "operator"
Application.ExecuteCommand "Display ""Main Menu"""
Case Else
End Select


Rinse and repeat for more clients
 
You got it, that's exactly what I would have suggested. I've got an application that does a similar thing, in that all clients display the same overview, but at startup each client checks it's own computer name and hides the controls for areas of the plant that aren't related to it. So all clients can see the whole line, but only the client in the specific area can control it.
 

Similar Topics

Hi all, Attached below is an example of what is happening to our existing SCADA. It seems after patching some Rockwell Software that I thought...
Replies
9
Views
261
The client has an application that when communication between the PLC and the Factory Talk VIEW supervisory fails, the object in the supervisory...
Replies
5
Views
224
Hello all, I am looking for a way to have a user get logged out after an X amount of time because to default so that user privilages are no...
Replies
4
Views
506
Hello everybody. I was wondering if there is a way in FTVIEW Studio to close ) view after x min without interaction . My issue is the following...
Replies
2
Views
330
Is there a way to choose the base font in ME. Text in the Arial Unicode MS which is the default font on my FTVS doesnt show up properly on a...
Replies
1
Views
620
Back
Top Bottom