Description: From SIMATIC Logon V1.2 (WinCC V6.0 SP2 and PCS 7 V6.1) onwards you use the "Default user" function. More information is available in the description of SIMATIC Logon.
Note:
In the WinCC OS project editor, select the Message View tab and in the Message Filter make sure that the default setting "Messages with area-enabling" is selected. This permits the "Default User" in SIMATIC Logon to acknowledge the messages on the message pages if that user has the "Enable for area" access authorization. The "Default User" has this authorization when the "Default Group" from SIMATIC Logon in the WinCC User Administrator has the "Enable for area" access authorization.
If the messages are not supposed to be acknowledged by the "Default User", in the WinCC OS project editor, you must select the setting "Acknowledgeable messages in a separate list" for the Message Filter in the Message View tab. More information is available in the WinCC Online Help under "Options > Options for Process Control > OS Project Editor > "Message View > Message Filter" tab".
The following description is only necessary for predecessor versions.
If you pull the chip card out of the chip card reader, the system will log you off. At that moment, no user is logged on to the system. You have the following options to log on a default user during this operation.
1. Automatic log-on of a default user while the card is pulled through
The C script will be called as a global action. Since the chip card has the higher priority, the script will only really become effective, once the chip card is pulled through.
- Open the "Global Script" editor.
- Go to "File" - "New Action".
- Enter the following C script
#include "apdefap.h"
int gscAction( void ) {
#pragma code ("useadmin.dll")
#include "PWRT_api.h"
#pragma code()
PWRTSilentLogin ("login","password");
return 0;
}
- Select the internal variable "@CurrentUser" as trigger for this action. Leave the trigger cycle set to the default cycle value of 2 seconds.
Every 2 seconds, the variable is checked for changes and the script is executed if a change occurs.
Note:
Shorter cycle times than the default value of 2 seconds for the trigger variable will lead to a loss of the system performance.
- Make sure that you have enabled the "Global Script Runtime" in the "Startup" tab in the computer properties.
2. Log-on a of default user by clicking on a button
The following C script is placed behind a button in the "@Welcome.pdl" picture, for example. This script is then only executed when you press the button.
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) {
#pragma code ("useadmin.dll")
#include "PWRT_api.h"
#pragma code()
PWRTSilentLogin ("login","password");
}
For example, a user is predefined as default user with the log-in "default user" and the password "default", the corresponding line is: PWRTSilentLogin ("defaultuser","default");
|