 |
plc.myforum.ro PLCs users www.plc.myforum.ro!
|
| View previous topic :: View next topic |
| Author |
Message |
gamax Member

Joined: 15 Jul 2016 Posts: 131
|
Posted: 11/12/2017 14:51 Post subject: How do you safely close WinCC via an external application? |
|
|
How do you safely close WinCC via an external application?
I found this interesting for put on here...
To close WinCC you should always use the appropriate buttons and functions to avoid damage.
In certain cases, for example when using an uninterruptible power supply (UPS), it might be necessary to close WinCC and shut down the operating system via an external program. The download in this entry contains a source code which you can use to resolve the task described. To be able to use the function you must employ a UPS that can start the program automatically when power failure is detected.
Instructions
| Code: | Download the text file at the end of this entry.
Făcute a new C++ project (with Visual Studio 2015, for example).
Add a new element to the resources files (Source.cpp, for example).
Copy the source code into the project.
Replace the parameter of the function DMEXITWINCCEXFCT in line 49 with one of the following parameters:
DM_SDMODE_WINCC Closes WinCC
DM_SDMODE_LOGOFF Closes WinCC and logs off the user logged on to the operating system
DM_SDMODE_SYSTEM Closes WinCC and shuts down the operating system
DM_SDMODE_REBOOT Closes WinCC and restarts the operating system
DM_SDMODE_FORCE_POWEROFF Closes WinCC, shuts down the operating system and switches off the computer
Copy the header files "dmclient.h", "ohioapi.h", "dmdefs.h" and "license.h" from the folder "Installation path > Siemens > WinCC > aplib" into the project folder and add them under Header files > Existing element.
Compile the project and through the release you create the .exe file.
Change the settings of the UPS so that when a power failure is detected, the executable file of the project is called (Shutdown_WinCC.exe, for example).
|
Download
The download includes the text file "Shutdown_WinCC.txt". Copy the "Shutdown_WinCC.txt" file into a separate directory and then follow the instructions given above.
https://support.industry.siemens.com/cs/attachments/89257244/shutdown_wincc.zip |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|