WinCC Login !! Login with Capital, Small or Mixed letters

SIMATIC08

Member
Join Date
Dec 2010
Location
Casablanca
Posts
4
Hello everybody

Ths is my issue :

- I want to attribute for each USER a variable in my project and use it when they LOGGED

So i used this script bellow (But in this solution i am obligate to login with Small letters)

what I want is to login with Capital, Small or Mixed Letters so I need to CONVERT "#CurrentUser" Variable to Small Letters befor the "strcmp(txt,"user_name")" command

(For Information : I have basic knowledge in C- Language so please i need a detailled information)

Script :
#define Tag_1 "@CurrentUser"
#define Tag_2 "USER_1_LOGGED"

char* txt;

txt =SysMalloc(20);

txt = GetTagChar(Tag_1);

printf ("txt=%s\r\n", txt);
if (strcmp(txt,"user_name"))

{
SetTagBit(Tag_2,0);
return 100;
}

else

{
SetTagBit(Tag_2,1);
return 200;
}

I will so greetful if you could help me in this issue becaus i am in rush
Thans
 
Did you try to configure it first at the User Administration of your WinCC?

I am not good with scripts but you can try if the User Administration will accept what you want.
 
Hi Christine

I already configured my USERS (I've 2 PILOT & OPERATOR) at USER ADMIN

I made a script (look at my first message) to set a bit when a USER logged in, but my problem appear when i log in with CAPITAL letters cuz on the script i used a comparaison between @currentUser WinCC variable and my USER Name (small letters) so automatically the function strcmp(txt,"user_name") won't be active

"If I log in with (pilote) the tag "USER_1_LOGGED" will set to 1
" (PILOTE) the tag "USER_1_LOGGED" won't set to 1
 

Similar Topics

Hi, At the moment, If the user fails to provide a valid username/password, the image attached appears "Invalid password or user name. Logon has...
Replies
12
Views
1,582
Hello everybody, How to make a button in screen appear after right login in wincc? I want to if it is me to login, I can see this button, other...
Replies
2
Views
1,958
Hello all, I have a WinCC server where users connect to using Webnavigator. What I want is a method to record at the server the login and logout...
Replies
1
Views
2,275
Hello everyone I've been lurking on this forum for quite a while now and I learned a lot about programming structures etc. Now the time has...
Replies
5
Views
2,463
Hello! I want to create a custom login screen in WinCC flexible (I am using version 2008 with SP2). The idea is like this: The screen will have...
Replies
2
Views
3,763
Back
Top Bottom