CurrentUserName from FT SE written to a tag

GtekSystems

Member
Join Date
Mar 2015
Location
Vancouver
Posts
2
Hi there,

I am fairly new to using FT SE and Controllogix and am currently trying to write the CurrentUserName( ) function to be written to a tag. The reason being is that I would like to sent the currently logged in user to a database in the case of an event occurring using FT Transaction Manager.

If anyone has any experience with this I would highly appreciate any help.

Thanks!
 
Welcome to the forums!

There is already a tag with the current user name stored in it - look in the system folder in HMI tags. system\User :)
 
Welcome to the forums!

There is already a tag with the current user name stored in it - look in the system folder in HMI tags. system\User :)
Thanks for the reply but I've tried using system/User however according to the help (using FT SE Network Distributed) it says that "system/user" is now obsolete and we are required to use the function "CurrentUserName( )". So unfortunate :(
 
Hmm. Okay, maybe create a macro to copy CurrentUserName() to your tag, and run the macro every time a user logs in (or out)? I'm not 100% sure of the macro syntax off the top of my head, but it would be fairly straightforward, and the help file will probably step you through it reasonably well. I would start with "Set [tagname] CurrentUserName()" and then poke at it until it stops giving you errors and works ;)

Alternatively you could use VBA, but if you're new to FTView SE you might want to leave VBA in your bottom drawer for a while ;)
 
Use String Display

Having read this and attempting various solutions, including HMI System Tag System/USerName, VBA solutions etc I found an easier solution.

To display the current user Try using CurrentUserName() within a String Display. (not displaying the name as a Literal string or string within text)

See attachment

String Display.PNG
 
Since you aren't trying to display the name but instead store the name into a tag that can be saved to a database, do as ASF mentions, use a Macro to do this.

You can create a login macro so that anytime a user logs in, it runs the macro. Very easy to do it this way. No VBA necessary.

OG
 
you might want to think about if you have multiple apps running also getting the computer name with the user. We have several people logged in at anyone time from different computers and I can see this getting hairy if you are trying to find someone that did something and have several people logged in at anyone time.
 
And for reference...

the System/User tag name was a carry over from RSView32 and never really worked the same way with the shift in FactoryTalk View to a client/server environment. This tag would only store the name of the user logged in to the HMI Server.

In a distributed system with multiple clients the System/User would always show the user logged in to the HMI server, whereas CurrentUser() would show the name of the user at that particular client. The function executes at the client level instead of the server level.

OG
 

Similar Topics

Hi Guys, How can I display Current logged in User Name display on FactoryTalk View studio Site Edition? What I did: String Display object >>...
Replies
3
Views
1,095
Hardware: 5069-L320ERMS2 Software: Logix Designer 35.11 / Ignition 8.1 Issue: When attempting to write to the tag "HMI_DRV200_DynamicTrim" in...
Replies
5
Views
758
Hi all, I've got a PLC program that's supposed to read the data of the individual ports on a Stratix switch (for example, the MAC address)...
Replies
14
Views
2,624
I have been thinking about picking up the P1AM-100 plcs from Automation Direct, and messing around with it. I took programming languages in...
Replies
28
Views
10,408
Hi All i was wondering if any one would be able to help me. My version of studio5000 only allows ladder and FB. i have an AOI written in structure...
Replies
2
Views
1,529
Back
Top Bottom