TIA Portal Visibility based on User Authorization

ASF

Lifetime Supporting Member
Join Date
Jun 2012
Location
Australia
Posts
3,921
Hi all,

I'm trying to work out how to control the visibility of an item based on the current user or user group - or more specifically, whether or not the current user has a certain authorization. Basically the equivalent of the CurrentUserHasCode() option in FTView. I can't find any way to link an item's visibility to anything other than a tag, and I can't find a way to link a tag to anything related to the user. Google hasn't been a lot of help, does anyone know of a way to achieve this?

Screen is a Siemens KTP600 and I'm programming it with TIA Portal v11.

Thanks!
 
Hi all,

I'm trying to work out how to control the visibility of an item based on the current user or user group - or more specifically, whether or not the current user has a certain authorization. Basically the equivalent of the CurrentUserHasCode() option in FTView. I can't find any way to link an item's visibility to anything other than a tag, and I can't find a way to link a tag to anything related to the user. Google hasn't been a lot of help, does anyone know of a way to achieve this?

Screen is a Siemens KTP600 and I'm programming it with TIA Portal v11.

Thanks!

I have done this myself so you should be able to do it.

I'm not 100% sure but look at the area pointers in the HMI. The same place where you can send what screen you are on to the PLC etc.
 
GetGroupNumber




Description
Reads the number of the group to which the user logged on to the HMI device belongs, and writes it to the given tag.
Use in the function list
GetGroupNumber (Tag)
Use in user-defined functions
 
Thanks Bratt! Is there any way to attach this function to a login event, rather than a screen loaded event? Just because if someone logs in, I would like the hidden items on the screen to appear immediately, without having to re-load the screen.

rQx, I'm looking in the Area Pointers, but the only pointers I have are Project ID, Screen number and Date/time PLC. Is there a way to create a new area pointer based on the group number?
 
Sorry, I was mistaken. I guess I did the same as Bratt explained. I haven't got the computer with TIA portal up and running so can't see how I did. But you can't change the Area pointers, thats for sure.

Maybe there is a way you can attach the GetGroupNumber to a tag that is cyclic in the HMI. A 1 sec pulse for example, and use OnChange to trigger the function.
 
Go to your HMI in TIA portal.
Press Scheduled tasks.
Add a new task.
Change to "Execute when the current user is changed" or "User Change"
Go to properties and Events.
Add "GetGroupNumber" and output to the tag you want it to write to.
 
It should be:
Event/Trigger: User Change
Function List:
TraceUserChange (to get all the relevant info)
GetUserName (String variable which you can use to show the user logged in)
GetGroupNumber (Integer variable which can be used to hide stuff if needed)

In the properties of the items you want to hide, select Animations > Display > Add Visiblity > Select GroupNumber tag > Select and set range of in-/visibility.


NOTE: Take care in setting up the user administration.
If you want users in group 1 and group 4 to not see the items, but users in group 3 and group 8 need to see it, this approach will not work for you.
 
Thanks guys, I'll give it a shot and see how it goes!

It's a pretty simple application - I've got a log in and a log out button stacked on top of each other, and I want to hide "Log In" when logged in, and "Log Out" when logged out, so that the correct button appears. And then I just need to make the engineering settings button invisible to anyone but the engineer login. So I should have no issues with Jeeb's warning above.

I suppose if I did have issues, once I had the tag set up I could monitor it in the PLC, and then set/clear bits in the PLC based on the logins to show/hide items...
 
Yup, that's what we used as a temporary workaround before I could permanently fix the user admin on the panels.
It's not as elegant, but it does the job.
 

Similar Topics

WinCC Professional Version V15.1 Update 2 I want one chart / Diagram window to display trend data from real time tags in PLC. I have 18...
Replies
1
Views
2,546
Hi PLC people, think about this scenario: The PLC is somehow connected to the same network with the facilities` network. Then someone connects to...
Replies
2
Views
86
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
190
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
116
Hello, i am using profibus as communication between plc and fanuc arm. I can easily send inputs from plc to arm, but i can't monitor any outputs...
Replies
0
Views
47
Back
Top Bottom