FAQS OF WINCC5_第1页
FAQS OF WINCC5_第2页
FAQS OF WINCC5_第3页
FAQS OF WINCC5_第4页
FAQS OF WINCC5_第5页
已阅读5页,还剩43页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

FAQS OF WINCC5.0 ON SIMENS ONLINEHardcopy of partial areas of images in WinCC V5.0 SP2QUESTION:How can I make a hardcopy of partial areas of an image (e.g. a graph). ANSWER:For example, you have a graph placed in your window and you want to make a hardcopy of this image. To achieve this, you need to know the coordinates and the size of your window, then you can initiate the generation of a hardcopy with a button as follows: #include apdefap.hvoid OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)WinExec(PrtScr.exe /C=20;10;800;400,SW_SHOWNORMAL);The numerical values in the sequence PositionX;PositionY;Width;Height correspond to the coordinates in the top left corner and the size of the window (Figure 1).Figure 1: Print area Please also consider entry-ID 9414679 about printing hardcopies in landscape format with WinCC V5 (SP2)/ WinCC V5.1 Functions & Samples: display driver block technique with the property Tag prefix of picture windows (V5.0 and higher)QUESTION:How does the display driver block technique work with the property Tag Prefix of screen windows? ANSWER:In your configuration you are using the display driver technique. Since version V5 of WinCC you can use the property Tag Prefix of screen windows. In this example there is dynamization with tag linking, dynamic dialog and C script. Dynamic dialog and C script work with a tag trigger. Important:It is important that the tag prefix of a picture window corresponds to a global definition. This means that the tag prefix of the picture window is valid for all tags that are edited in this picture window or changed in any other way (script).Consequently, these tags have to be members of the structure whose name you have specified as tag prefix for the image window.Let us assume that you declare a tag with the name Hallo outside the above-mentioned structure and try to change it in the picture window, then an attempt is made to change the tag with the name Tag_prefix.Hallo. This leads to an error, because this tag does not exist.Furthermore, make sure that the tag prefix of the picture window is also valid when you create another tag prefix in the picture window.The following interpretation is valid for tags that are edited in this picture window or changed in any other way (script) in the sense of the second definition:Tag_prefix1.Tag_prefix2.Tag_name. Note on dynamic dialog:In order to be able to work with the dynamic dialog you must observe the following two items: The item must be specified with the property Tag Prefix.Example:ampel13. The dynamic dialog checks whether the tab exists. Therefore you have to create another normal tag again for each member tag of a structure.Example:The structure has the three members .red, .yellow and .green. Then you have to create the three tags red, yellow and green. Advantage of this block technique:You dont have to use any unnecessary C scripts. A good performance is also achieved through the tag trigger. Note on changing the tag prefix:Please note that a change to a tag prefix only becomes effective in a picture window when a picture change takes place in the picture window. This has been implemented in a sample project. See here also the Online Help of the Graphics Designer, in the Tag prefix property of the picture window. Charged software (payment by SIMATIC Card / Automation Value Card):The download contains a WinCC V5 project which demonstrates the functionality described using an example. ampel.exe (323 KB, 50 units) Copy the ampel.exe file into a separate directory and start the file with a double-click. The WinCC V5 project is now unpacked with all its associated subdirectories. Then you can open and process the project with WinCC. Steps required for setting up an OPC connection (WinCC V5.0 SP2)QUESTION:What steps are required to start up a WinCC station as OPC server or as OPC client (OLE for Process Control)? ANSWER:Steps required on the WinCC station as OPC server if you want to access this from another computer: 1. The OPC server/client component must be installed (automatically installed at Setup with WinCC V5.0 SP2 and higher). 2. The DCOM interface must be parameterized. Necessary steps on the WinCC station as OPC client: 1. The OPC server must be in the same network as the OPC client. 2. In the WinCC Explorer you insert the OPC channel via Right-click on Tag Management Add New Drivers. Please select OPC.CHN here. 3. Now open the OPC unit by clicking the + icon on the left of it or by double-clicking the OPC channel. 4. In OPC Groups right-click System Parameters and the OPC Item Manager opens. 5. Click the Computer button, enter the name of the computer of the OPC server and then click OK. This is only necessary if the OPC server is not operated locally. If used locally on the same computer, then double-click Local. 6. If the OPC server supports a browser, then this can be selected accordingly through Browse Server to offer the possible OPC tags in the OPC Item Manager.If this is not the case, then the OPC tags have to be created manually. 7. Acknowledge the subsequent Filter Criteria window with Next-. 8. Now you see all the tags that the OPC server has to offer. Select the relevant tag with Add Items. Using the CTRL key you can select several tags at once. 9. If there is no connection, you can set one up by acknowledging with YES in the window that now opens. 10. Select an appropriate name and acknowledge with OK. 11. You should give a prefix for the sake of easy recognition. The OPC connection should now be possible if the OPC supports a browser like WinCC. In the case of other OPC servers you must ask the provider whether this is the case. Please note that this is only a rough overview of the necessary steps. More information is available in the WinCC Information System. Keywords:Setup, Connection, Software interface Saving process pictures locally on the multi-client with WinCC multi-user systems with WinCC V5.0 + SP2 and higher.QUESTION:How can I save the process pictures locally on the MultiClient with WinCC multi-user systems? ANSWER:You have a project that runs on a WinCC multi-user system. Now process pictures are to be stored locally on the MultiClient, so that these pictures and not the pictures from the server are used. This reduces the number of accesses made to the server via the network.Go into the directory SiemensWinCCbinPDLCache. (You may have to create this directory). In this directory create a subdirectory called . The Symbolic Server Name corresponds to the service prefix; both terms mean exactly the same thing. You have to create a separate subdirectory with its own symbolic name for each server. Then you copy into it the process images for the respective server.The pictures must also continue to be available on the server. The date of the picture files of the MultiClient must be more recent or the same as the date of the picture files of the server. As soon as the picture files on the server have a more recent date, the runtime on the MultiClient acquires the pictures from the server via the network. Important:If through configuration new files are added or files are modified, then you must do a manual comparison of the copies on the client computer. Referenced files (e.g. EMF, WMF, BMP) are always loaded from the project path via the network. Note:How to store pictures on the UniClient is described in FAQ Entry ID 982658. Keywords:Performance improvement WinCC V5.0: starting the project automatically depending on the user logged inQUESTION:How can I start a WinCC project automatically depending on the user logged in when the computer is booted? ANSWER:When starting the computer you want to have a specific project started in the WinCC Control Center or in WinCC Runtime depending on the user logged in. If you are using the AutoStartRT.exe program, it is only possible to start WinCC directly when the computer is booted independent of the user logged in. There is however one possibility of starting a project depending on the user logged in either in RT or only in the Control Center. For this you must create a link to the .mcp file of the required project in the following directory: Winnt.400/Profiles/Startmenu/Programs/Autostart If this project is terminated in the RT, then the next time the computer is booted with the corresponding login, then it starts again in Runtime mode. If another user has another project open on this computer, then a link is to be made to this project under the other user profile in the same way as described above.Note:This is only possible if you have an RC license installed on your computer, because otherwise WinCC runs in DEMO mode.Keywords:Automatic startupSIMATIC WinCC Option Package: Open Development Kit ODK Version 5.0 SP1Summary:Effective immediately, the SIMATIC WinCC option package Open Development Kit V5.0 SP1 is released for delivery. Compared to the previous version, it contains the following function expansion: Process Control Options Support for WinCC V5.0 SP2 For additional information, see the product description. Product Description: General InformationThe SIMATIC WinCC option package Open Development Kit (ODK) V5.0 SP1 replaces the previous ODK V5.0. ODK V5.0 SP1 is released for WinCC V5.0, V5.0 SP1 and V5.0 SP2. ODK V5.0 SP1 can be ordered from the Internet as a free update to ODK V5.0. To do so, access the SIMATIC Customer Support Web site at www.ad.siemens.de/simatic-cs and select the Product Support tab. In the Entry ID field of the Simple Search function, enter the ID number 6944475 and then click on the Display button. As proof of purchase and authorization for this free update, you will need the identification number of your original ODK V5.0 software delivery.For users of ODK V4.01, a low-priced upgrade package from ODK V4.01 to ODK V5.0 SP1 is available. Function ExpansionsThe Open Development Kit (ODK) makes data and functions of WinCC available via programming interfaces, which allows individual WinCC extensions to be created in scripts or programs. ODK V5.0 includes expansions that support the increased configuration possibilities of the WinCC V5.0 basic package. In ODK V5.0 SP1, process control options are supported as well (Basic Process Control, Storage and Chipcard). Open Development Kit ODKThe ODK option package enables you to use internal WinCC functions. For example, the following applications are possible: Access to values from Tag Management or archives Generic configuration, e.g. generation of tags or screens Integration of already existing processing programs Generation of messages and application routines Control of the measured value recording from application routines Control of reports from application programs Use of WinCC configuration dialogs for in-house-developed software options The following data can be accessed: Tag Management Data Archive Data Configuration Data Configuration and runtime functions can be utilized. The API functions can be used at the following places: In C development environments for your own Windows applications; as the development environment, Microsoft Visual C+ Version 6 is required Within WinCC, e.g. for C-actions in Global Scripts or the Graphics Designer The ODK option package consists of: CD-ROM containing header files, libraries, online help and examples Documentation of the API functions in electronic form (no printed manuals) Voucher for a one day ODK Introduction class for a maximum of 3 participants For questions regarding the introductory class, please contact your responsible Siemens office. Ordering WinCC Option Package ODK V5.0 SP1 Product Name Order Number WinCC/ODK consisting of:- ODK CD-ROM- Electronic Documentation- 1 Day Class (for on-site class, add travel expenses) 6AV6371-1CC05-0BX0 WinCC/ODK Upgrade 1)(from V4.01 to V5.0 SP1) 6AV6371-1CC05-0BX4 WinCC/ODK Update(from V5.0 to V5.0 SP1) Ordering via the Internet(Entry ID: 6944475) 1) The installation of the ODK upgrade requires ODK V4.01 to be already installed! For further questions, please contact your responsible Siemens office. Function extension of the control variables of the user archive to WinCC V5.0QUESTION:I would like to attach data records to a user archive. Is there a simpler way than via C scripts? ANSWER:With WinCC V5.0 the function of the control variables for the user archive is extended. It is now possible to attach data records to a user archive via the control variables. This does away with the need for a C script. Enter the ID -1 and job 6 to read the current contents of the process variables into the table. The new values are added to the end of the table. The IDs of the data records are counted up in sequence. The jobs Write, Job 7 and Delete, Job 8 are not possible via ID -1. More information on the control variables is available from the online Help on the user archive. Keywords:archive configuration Functions & Samples: Create message when logging onQUESTION:How can I create a message when logging on? ANSWER:The following example for WinCC V5.0 / V5.0 SPx shows how you can generate a message in Alarm Logging when logging on. As process value block this message contains the name of the user logged on. Proceed as follows for this: 1. Create an internal text variable (8 bits, length sufficient for the longest user name) for the previous user OldUser and for the user currently logged on CurrentUser. If the variable CurrentUser already exists, you do not need to create it again. 2. In addition you need the internal bit variable Loginbit to trigger the message system. 3. In the message system link the Loginbit as event variable with a message and in the message incorporate the variable CurrentUser as process value block. 4. The following script is to be incorporated as new action in the Global Script editor under Actions/global actions. The trigger of this action is set on the variable CurrentUser. You need the Sleep Call (see script) of Windows, because the Alarm Logging has its own variable display that is refreshed every second. This means that the variable CurrentUser in the message system at the moment the message is generated does not yet have the actual value. With the Sleep Call the action is delayed until the variable CurrentUser is updated in the variable display. 5. In order for you to obtain an entry in your archive when you start WinCC, you must assign an initial value (e.g. Restart) for the variable OldUser.Program code:include apdefap.hint gscAction( void )/ Include Sleep() - Function#pragma code (Kernel32.dll)void Sleep(int a);#pragma code() / Variable declarationchar *NewUser, *OldUser;OldUser=GetTagChar(OldUser);NewUser=GetTagChar(CurrentUser); / Output in the diagnostic windowprintf(new-user: %srn,NewUser);printf(old-user: %srn,OldUser);printf(%drn,strlen(NewUser); / Check out if the CurrentUser is emptyif(strlen(NewUser)!=0)/ Reset of the LoginbitSetTagBit(Loginbit,0); / Waiting for 1 sec. and then releasing the MessageSleep(1000); / Release Messages + setting again the OldUserSetTagBit(Loginbit,1);SetTagChar(OldUser,NewUser);return 1; Charged software (payment by SIMATIC Card):The example contains a WinCC V5.0 + SP1 project that generates a message in the Alarm Logging when logging on. The logged-on users are stored in a long-term/short-term archive. You can test the function immediately with the following users: UserPasswordAdministratorAdministratortestertesteruseruserLogin1.exe(2,002 KB, 25 units) Copy the Login.exe into a separate directory and then start the file with a double-click. The WinCC V5.0 + SP1 project is unpacked automatically with all the associated subdirectories. Then you can open the unpacked project with the WinCC Explorer. Please change the name of the server in the project to the name of your computer. Now you can test the project and adapt it to your requirements. Note:Information on this topic for WinCC V5.1 / WinCC V6.0 and higher is available in Entry ID: 11870927. Search terms:Logging on, Protocols Functions & Samples: exporting multiple WinCC trends to an Excel fileQUESTION:How can I export multiple trends to an Excel file? ANSWER: Function:The sample project Export.exe calls the TLGBackupA or TLGBackupA_ug function multiple times. In this project, you can define the export period exactly down to the second. By calling this function multiple times you can export multiple trends to a CSV file. You have two options for creating the CSV file: 1. The individual values of the exported trends are separated by a line with the name of the trend and dashes. This file can be edited with Microsoft Excel. You can define the name of the file to be exported yourself (TLGBackupA). 2. The individual values of the exported trends are written in one column per trend. This file can be edited with Microsoft Excel. You can define the name of the file to be exported yourself (TLGBackupA_ug).Charged software (payment by SIMATIC Card / Automation Value Card AVC): The following download includes a WinCC project with the necessary configuration in the Graphics Designers and the Global Scripts required. The project has been created with WinCC V5.0 + Service Pack 1. You can adapt the configuration as you wish to suit your requirements. Note:B

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论