10/3/2015 12:22 PM | |
Joined: 9/23/2005 Last visit: 3/21/2025 Posts: 4406 Rating:
|
“Simple Samples” are small projects that demonstrate simple features. The target is give a quick overview about the theme and be used as start point for related discussions. Follow there are a short description and the configuration main steps.
Description:
This simple sample show how to identify the actual logged user and show it in a screen.
Principle: WinCC provide internal tags with sign the actual logged user:
@CurrentUser / @CurrentUserNames, both, shows the user name for the case of users from internal WinCC user data bank. In the case where the user data bank comes from windows (with use of SIMATIC Logon package), @CurrentUser shows the Windows user name and @CurrentUserName shows the Windows full name user.
By scripting, it is possible to check if the user has a determinate Authorization level.
Requirements: WinCC Professional V13 SP1.
Project with a minimum configuration (stop button, tags, users, user groups, authorizations, etc. See “WinCC Professional V13 SP1 – Simple Sample: Users – access restriction” https://support.industry.siemens.com/tf/br/en/posts/135189/).
Configuration main steps:
#include "GlobalDefinitions.h" double ProcessValueValue(char* screenName, char* objectName, char* propertyName) { //Insert the code starting here
return IsUserAuthorized(4); }
Note that the number 4 represents the number of “Authorization_1”, in Project tree → WinCC → User Administration → User Groups → Authorization division
References: Manual WinCC Professional V13.0 https://support.industry.siemens.com/cs/br/pt/view/92323076/en
Online helps system WinCC Professional V13.0 SP1 https://support.industry.siemens.com/cs/br/pt/view/109096785/en
FAQ Which VBS information and VBS programming tools are there in WinCC (TIA Portal)? https://support.industry.siemens.com/cs/br/pt/view/59885894/en
Tips and tricks for creating scripts in WinCC (TIA Portal) https://support.industry.siemens.com/cs/br/pt/view/57132412/en
Project: Due a size/ format restrictions, the project is attached as project.zip. AttachmentProject.zip (363 Downloads) |
Denilson Pegaia |
|
Follow us on