![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
|
WinCC Flexible - Graying out buttons
I've currently got a project where I need to grey out buttons if the current user doesn't have a high enough priority to be allowed to operate them. In ProTool I could solve this quite easily by laying a greyed out copy of the switch over the symbol for the switch itself and using the visibility attribute to "remove" the field if the user had a sufficiently high priority.
I'm having trouble finding a way to do this in Flexible because I can't find a way to use the user's authorisation level as a variable to switch the visibility attribute. In fact I can't find any way to query the current user's authorisation level in order to then switch a separate variable for the visibility control. Has anybody any thoughts on how I can solve this problem? |
![]() |
![]() |
#2 |
Member
![]() ![]() Join Date: Feb 2007
Location: Leuven
Posts: 1,059
|
Have you checked out the UserGroup?
EDIT: I'm in a generous mood. ![]() Device Settings > Scheduler > Create new Job with Event "Change user" > Function: User Administration: Trace user change > Function: User Administration: GetGroupNumber. This will be the same number you configure in the Runtime User Administration. Link this with the visibility option and you're done. Last edited by Jeebs; February 22nd, 2012 at 10:39 AM. |
![]() |
![]() |
#3 |
Lifetime Supporting Member + Moderator
|
Under Device Settings ... Scheduler add the system functions GetGroupnumber, GetUserName (maybe) and TraceUserChange to the event Change User. Specify a suitable internal tag to store the Group Number.
You can then query the userlevel by the GroupNumber anywhere in the HMI program. If you have a lot of buttons or i/o fields you want to animate this way, or several userelevels, it will be somewhat of a chore to program.
__________________
Jesper ![]() NOTICE: JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm ! Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ |
![]() |
![]() |
#4 |
Member
![]() ![]() Join Date: Feb 2007
Location: Leuven
Posts: 1,059
|
Hmmm, sniped by Jesper when I was still editing...
![]() |
![]() |
![]() |
#5 | |
Member
|
Quote:
Thanks to both for the route - I hadn't discovered it and the help file was about as much use as it ever is for me! Edit: The GetGroupNumber function looks like it should do exactly what I want - if I could only persuade it to work! In the old ProTool Program I only had the ShowLogonDialog command attatched to the Login button so I reckoned I needed to add the Login Function as well which then stores the User Name and Password, however, for some reason it's still not storing the GroupNumber. I guess I'll have to do a bit more reading. At least I don't need to worry about any time constraints, final commissioning isn't due until late 2013! ![]() Last edited by RMA; February 22nd, 2012 at 10:58 AM. |
|
![]() |
![]() |
#6 |
Lifetime Supporting Member + Moderator
|
You can also just select many buttons at one time and do the animation edits on all the selected buttons. But it gets complicated if there are many userlevels, or maybe even groups with more or less overlapping authorisations (new feature in WinCC Flex over Protool).
__________________
Jesper ![]() NOTICE: JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm ! Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ |
![]() |
![]() |
#7 |
Member
|
Just read the help file for the "Logon" function and there it says that the User name and Password variables are the variables from which the User Name and Password are read! I don't really understand where you would want to use that, but it looks as though that's not the function I require to persuade Flex to store my User level when I log on.
Looks like I need to do some further investigation. |
![]() |
![]() |
#8 | |
Lifetime Supporting Member + Moderator
|
Quote:
For debugging and general awareness of the currently logged-in user, I have both username and user group number on the template so it shows on every screen. Right next to the logon and logoff buttons. edit: Just follow the advice of addings the mentioned functions to the Scheduler event Change User. Then it will work.
__________________
Jesper ![]() NOTICE: JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm ! Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ Last edited by JesperMP; February 22nd, 2012 at 11:25 AM. |
|
![]() |
![]() |
#9 | |
Lifetime Supporting Member + Moderator
|
Quote:
__________________
Jesper ![]() NOTICE: JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm ! Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ |
|
![]() |
![]() |
#10 |
Member
![]() ![]() Join Date: Feb 2007
Location: Leuven
Posts: 1,059
|
This is our current configuration.
The tags are then used to display Username and Usergroup (with textlist) on each Screen. Setup is almost identical to Jesper's. Every time a user logs in or out, the tags will be updated. |
![]() |
![]() |
#11 |
Member
|
@Jeebs, with the exception of the GetUserName, that's exactly what I've done and in my case the Group Number is stored in my old "Password_Level" variable from the old ProTool program.
I'll have to have a closer look at where it's being accessed, maybe something got screwed up in the conversion to Flex or else I'm maybe overwriting "Password_Level" somewhere else in the program. |
![]() |
![]() |
#12 |
Member
![]() ![]() Join Date: Feb 2007
Location: Leuven
Posts: 1,059
|
Make sure to put the Traceuserchange first in the list.
Use a new variable just to check if the function is working as intended. Your user does need to be part of a group however. If he is locked out, ie entered wrong pass 3 times, its user group will be set to 0. |
![]() |
![]() |
#13 |
Member
|
Things are getting very strange now. I went online to test and suddenly had a load of alarm messages at the runtime startup which I hadn't had before (also the Admin password had been changed - although that's something that seems to happen on a regular basis, haven't a clue why!). I then decided to go back offline and create a new variable to store the group number in, which obviously was no problem, but when I then went back into the Scheduler to change the variable, the "GetGroupNumber" function has disappeared!!!!
Under "User administration" there is only "GetUserName" available! I think it's time to stop or today! I'm off down to the customer tomorrow and I'd like to have had this finished, but he only needs the functionality to do the system checks, so it will suffice for the time being if I just leave all buttons available. Then on Friday I can try and find out where my "GetGroupNumber" function has got to! Cheers for now Roy |
![]() |
![]() |
#14 |
Member
![]() ![]() Join Date: Jul 2015
Location: Perth
Posts: 3
|
OK I have inherited a project where ALL buttons are hidden. Even if I create a new screen with anew button , it is invisible. I've checked everything...does anybody have any ideas ?????
|
![]() |
![]() |
#15 |
Lifetime Supporting Member
![]() ![]() Join Date: Apr 2007
Location: UK
Posts: 1,659
|
Language settings....is the project and the edit language the same?
|
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Citect Vs WinCC - Long | Doug_Adam | LIVE PLC Questions And Answers | 22 | October 3rd, 2014 02:56 PM |
Wincc flexible tag multiplex - buttons | cjd1965 | LIVE PLC Questions And Answers | 3 | November 11th, 2010 03:17 AM |
Why cant OPs state the "Flexible" in WinCC Flexible ? | JesperMP | LIVE PLC Questions And Answers | 0 | August 5th, 2008 03:41 AM |
WinCC Flexible Quirks | tvey | LIVE PLC Questions And Answers | 5 | May 3rd, 2007 07:57 AM |
Simatic Wincc Flexible 2004 -->2005 | STL??? | LIVE PLC Questions And Answers | 8 | August 29th, 2006 07:42 AM |