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,537
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
1
Views
16
Hi guys , I'm new with Allen Bradley, but I have experience with Tia portal (s7 1200 ,s7 1500) I want to convert my project from Tia portal to...
Replies
2
Views
188
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
148
Hello gentlemen, Im working on a small project on TIA Portal, about establishing a Modbus TCP connection between my ET200SP plc and a socomec...
Replies
12
Views
294
Back
Top Bottom