Thread Content
I need to work on a project that requires a login screen. Have anyone here done this before? The specific requirements are as follows: on this login screen, it should be possible to create new users arbitrarily and assign permissions to those users; users can also be deleted. Users should be able to log in and log out. Instead of just describing the general approach, it would be better to have actual source code.
If you install the full PCS7 software and create a project using the WIZARD, then compiling the OS will automatically generate a WINCC project, which will include all the necessary frameworks as well as options for logging in and setting permissions.
I’m talking about WinCC, not PCS7; what’s mentioned below is a PLC, not Siemens’ DCS.
Do you understand the difference between Siemens’ PLCs and DCS systems? The difference lies only in the software; the hardware is identical. Take the S7-400 CPU as an example – it can be configured as a PLC or as a DCS. If you configure it as a PLC, you only need STEP7 and WINCC; but if you configure it as a DCS, additional software is required. These extra software tools don’t add any new functions but simply simplify the configuration process. For instance, when using CFC for configuration, you still end up creating basic elements such as OBs, SBs, FBs, and FCs, but the process is simplified compared to using ladder diagrams. Moreover, it supports integration with WINCC. The basic combination of STEP7 + WINCC + these additional software tools constitutes PCS7. Since the hardware is the same, you can configure it in either way.
I repeat that it is in WinCC, not in Siemens’ PCS7 DCS. Siemens’ PCS7 has support from many other software applications, but WinCC alone does not have as much support from other software. Many functions were developed by myself using C language and VB.
Siemens offers a ready-made simple login interface (with password and permission settings in WINCC); it can be found at the following link: http://www.ad.siemens.com.cn/download/searchResult.aspx?searchText=A0048
Add the following script to the login button: #pragma code("useadmin.dll") #include "PWRT_API.H" #pragma code() if (PWRTSilentLogin("username", "PassWord")) { //Actions to be taken after successful login } Here, “USERNAME” and “PASSWORD” can be replaced with variables that store the username and password, for example: PWRTSilentLogin(GetTagChar("user"), GetTagChar("PassWord")). When login is successful, the function returns a true value; if the login fails, it returns a false value. It is also possible to log in after defining a hotkey (Project Properties -> Hotkeys). Last edited by Mobei Yihai on 2009-4-20 16:00
I think there aren’t many people in the chemical industry who have worked with WinCC, mainly because it’s not widely used in process industries. There are many companies in the steel machinery industry; I hope experts can offer some guidance. I’m using it.
Xianyang Chemical’s 600,000-ton methanol plant uses PCS7.