WinCC V6 auto start

首页    02解决方案    服务支持    西门子支持    WinCC V6 auto start
SIMATIC WinCC V6 - automatic project start

SIMATIC WinCC V6 - automatic project start



QUESTION:  
How can I start a WinCC V6.0 project automatically?

ANSWER:
  

You want to start a WinCC project automatically when the computer starts up. For this you normally use the WinCC Autostart function. A description of the function is available in the Online Help in the following path: Working with WinCC > Working with Projects > Enable Project > Setting up Autostart. There may be special cases that have to be adapted specifically for a project. You have the following options:

1.       A WinCC project (Control Center, Control Center and Runtime or just Runtime) is to start automatically depending on the user logged in.

2.       When the computer starts, a specific WinCC project (Control Center, Control Center and Runtime or just Runtime) is to start automatically independent of the user logged in. 

General: 
Depending on the configuration of your system, when you start the computer there might be synchronization problems at the operating system level. To avoid this there is a Wait function in the following batch processing file. You might have to adapt this Wait function to your system. Copy the attached Wait.exe file into the path C:\Winnt\system32\

Note:
The WinCCExplorer.exe and AutoStartRT.exe files are in the folder  ...Siemens\WinCC\bin\ . Change the access paths in the WinCC_Batch.bat file to the access paths of your WinCC installation.

  

1.       A WinCC project (Control Center, Control Center and Runtime or just Runtime) is to start automatically depending on the user logged in.

·       Copy the attached WinCC_Batch.bat file into the Autostart of the user concerned. The path for the user "Operator" then looks like this:
"C:/Documents and Settings/Operator/Start Menu/Programs/Autostart"

·       Edit WinCC_Batch.bat according to your start requirements:

Start mode

Changes to be made

Start WinCC Control Center with/without Runtime

Remove 'REM' from the second line and replace the path D:\User\Autostart.mcp with the path of your project.
If your project was last closed with Runtime running, then both WinCC Control Center and WinCC Runtime will be started with your project.

Start WinCC Runtime

Remove 'REM' from the sixth line and replace the path D:\User\Autostart.mcp with the path of your project. 

·       You have to copy and change the batch processing file for each user.

2.       When the computer starts, a specific WinCC project (Control Center, Control Center and Runtime or just Runtime) is to start automatically independent of the user logged in.

·       Copy the WinCC_Batch.bat file into the Autostart for all users. The path then looks like this:
"C:/Documents and Settings/All Users/Start Menu/Programs/Autostart".

·       Edit WinCC_Batch.bat according to your start requirements:

Start mode

Changes to be made

Start WinCC Control Center with/without Runtime

Remove 'REM' from the second line and replace the path D:\User\Autostart.mcp with the path of your project. 
If your project was last closed with Runtime running, then both WinCC Control Center and WinCC Runtime will be started with your project.

Start WinCC Runtime

Remove 'REM' from the sixth line and replace the path D:\User\Autostart.mcp with the path of your project. 

Remark:
Notes for WinCC V4 are available in Entry ID: 622815 and for WinCC V5 in Entry ID: 1958892.

Free file download:
Attached is a self-extracting file entitled "Batchwait.exe" that you can download. Copy the "Batchwait.exe" file into a directory of your choice and run the file. You are provided with the following two files:

File

Description

Wait.exe

Program file - has to be copied into the directory "Winnt\system32".

WinCC_Batch.bat

Batch processing file - has to be copied and changed accordingly.


img1Batchwait.exe ( 37 KB )    

IMPORTANT
The sample program is freeware. Every user can use, copy or forward this program FREE OF CHARGE. The authors and owners of this program take no responsibility whatsoever for the functionality and compatibility of this software. Use of the software is entirely at the users own risk. Since this software is free of charge, there is no warranty, no claim for error correction and no hotline support.

Keywords:
Autostart







WinCC V6 - automatic login at startup (Silent Login) / during Runtime



QUESTION:  
How can I automatically log in a default user  after a reboot without using the Login Box?
How can I ensure that a default user is always logged in during Runtime, even if another user has logged out beforehand? 

ANSWER:
After a reboot and during Runtime you want to achieve minimum availability of your HMI system without using the Login Box. Nevertheless, the Login function should be retained for higher-level operations. In addition, if no user is logged in, then a default user is to be logged in automatically. The rights of the default user are to be specified in the User Administrator to suit your requirements.

You can implement this function with the following C script. Proceed as follows for this:

1.       Copy the attached function "Silentlogin.pas" into your project in the "PAS" subfolder.

2.       In your project go to Global Script > C Editor > Actions > Global Actions and open the global action "Silentlogin.pas".

3.       In the line "PWRTSilentLogin ("Login","Password");" replace the user "Login" with your default user and "Password" with the password of your default user.

4.       Compile and save the C script. 

5.       Set a variable trigger to the variable @CurrentUser. Select "2 s", for example, for the cycle. This ensures that the system is not overloaded by the script. In the example described the variable @CurrentUser (contains the currently logged in user) is queried every 2 s for changes. The script is called only when the user changes, e.g. when the current user logs out.

6.       Make sure that you have activated "Global Script Runtime" in the computer Properties, "Startup" tab.

The following additional steps are required for SIMATIC PCS 7 users (SIMATIC PCS 7 V6.0 SP1 and higher):

1.       Copy the system picture @Welcome.pdl to a safe location  to be able to restore the original picture.

2.       Open the picture @Welcome.pdl with the Graphics Designer.

3.       Open the C script stored in Select Picture (Right-click > Event > Picture Object > Miscellaneous > Open Picture).

4.       Comment out the line "PASSLoginDialog(Screen);" with prefixed //.

5.       Compile the C script.

6.       Save the system picture @Welcome.pdl.

Warning:
If you run the OS project editor again, make sure that the system picture @Welcome.pdl is not taken from the basic data. For this, in the tab "Basic Data > Basic pictures in project deviate from delivered state > accept delivered state" must not be marked for @Welcome.pdl. 

If you are using SIMATIC LOGON version V1.2 or higher, then you do not need the "Silent Login" function, because beginning with this version SIMATIC LOGON includes its own convenient function for automatic login into WinCC Runtime. If you use the "Silent Login" function and wish to switch to SIMATIC LOGON, then undo the steps performed above.

Procedure in  SIMATIC LOGON beginning with version V1.2: 

·       Open User Administration in WinCC Explorer and create a grouped named "DefaultGroup" in your project. Make the relevant settings for authorization levels in the group. The only "User" of this "Default User" group is created automatically and entered in the Registry. You must not assign any parameters for this user.

·       In the SIMATIC LOGON configuration window, go to the "General" tab and select the function "Log on 'Default User' after user logoff", and close the dialog with "OK" (Fig. 1).

img2

Fig. 1: Configuration dialog for SIMATIC LOGON

With these settings the "Default User" is logged in automatically when you start WinCC Runtime and when other users log off.

File for free downloading:

img3 Silentlogin.exe ( 29 KB )  

The sample program is freeware. Any user can use, copy or forward this program FREE OF CHARGE. The authors and owners of this program take no responsibility whatsoever for the functionality and compatibility of this software. Use of the software is entirely at the users own risk. Since this software is free of charge, there is no warranty, no claim for error correction and no hotline support.

Keywords:
Silent Login, Autologon



2020年2月20日
浏览量:100010