show the entry list
WinCC -- Creating HMI configurations -- Configuring Runtime
How can you lock key combinations in WinCC V7.0 SP2/WinCC (TIA Portal) with Windows 7 or Windows Server 2008?
How can you have a user-specific, user-defined screen composition displayed automatically after logging on in WinCC Runtime?
How can you increase the timeout for terminating the runtime?
How do you select the path for the picture cache yourself in WinCC and how do you use the picture cache?
How do you start a specific WinCC project depending on the user logged in when the computer is booted?
How can you have different picture to the "@Welcome.pdl" Start picture displayed at the start of Runtime?
How can you have the current picture continued to be shown when you log out of WinCC Runtime?
How can you replace the Windows on-screen keyboard of SIMATIC Logon (from V1.4) with the ProTool keyboard so as not to reach the operating system during Runtime?
How do you identify the local computer name in order to enter it in the computer list for the WinCC project?
How do you configure the WinCC Autostart when using SIMATIC NET (up to and including CD11/2003 SP1)?
How do you configure the WinCC Autostart when using SIMATIC NET (as from Edition 2005)?
How do you use the monitor keyboard of WinCC?
How can you implement login/logout via a button in a picture?
How can you execute an automatic logout after a time greater than 999 minutes?
How can you configure automatic logout in WinCC?
How can you automatically log in a default user after a reboot without using the Login Box?
With Windows Server 2000/2003, Windows 2000 Professional, Windows XP Professional and Windows Vista, what should you do if disabling the key combinations is ineffective in WinCC?
OS - WinCC -- Creating HMI configurations -- Creating pictures
How do you use the smart object "DataSet"?
Generate user object in the Graphics Designer
Configuring a status display
What should I watch out for with actions when using a Multi VGA card?
How can you implement login/logout via a button in a picture?
How can you incorporate user-created DLLs in WinCC?
What is the meaning of the parameters that are available for the mouse and keyboard event actions?
How can you query key combinations and how can you use scripts to prevent the key repeat function of Windows?
How can a combo box configured in the OS be filled dynamically with texts of different languages?
How can you use the texts of enumerations (under Shared Declarations in the SIMATIC Manager) for display in WinCC?
How can you display the operator panel of the S7 CPU of the Box PC on the OS?
When are the variables @Signal1..@Signal3 updated (PCS 7 V4.x/V5.x)?
Explanation of index and status at the extended status report in Simatic PCS 7 V6.0
Implementing and configuring the extended analog display with SIMATIC PCS 7 V6.x
Displaying logical operators in the WinCC Dynamic Value Ranges dialog
Specification of the color definition of the used colors in WinCC
How can you implement login/logout via a button in a picture?
Part number:

Instructions:
Configure the following C actions in a picture in combination with different buttons:

  • Action for login (for example, "mouse click" event):
    #pragma code ("useadmin.dll")
    #include "PWRT_api.h"
    #pragma code()
    PWRTLogin('c');
  • Action for logout (for example, "mouse click" event):
    #pragma code ("useadmin.dll")
    #include "PWRT_api.h"
    #pragma code()
    PWRTLogout();

The parameter for PWRTLogin must be a CHAR character. It specifies on which monitor the dialog is displayed. If you are only using one screen, then you can leave the default parameter "c", or specify "1".

Note:
You can also use the function PASSLoginDialog instead of the functions PWRTLogin or PWRTLogout. This function requires the same parameters as the PWRTLogin function. The functions PWRTLogin and PASSLoginDialog call the login mask, where you can log in or log out. The function PWRTLogout is executed directly and does not call the login mask.

Both functions return "1" if they are executed correctly. However, the login does not wait to see if the dialog is really displayed.

Note:
If you are using more than one monitor, you need WinCC Basic Process Control(OS Project Editor), so that the Login dialog is displayed on the appropriate monitor.
You can also specify a monitor number without Basic Process Control, but the Login dialog then always appears on the first monitor.

Keywords:
Programming tips

 Entry ID:71087   Date:2008-08-15 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour