Benutzer Eng

download Benutzer Eng

of 528

Transcript of Benutzer Eng

  • 7/23/2019 Benutzer Eng

    1/527

    SINUMERIK 840D/840DiSINUMERIK 810D/FM--NC

    Users Manual 07.2008 Edition

    HMI Programming Package Part 1

    Manufacturer/Service Documentation

  • 7/23/2019 Benutzer Eng

    2/527

    Manufacturer/Service Documentation

    Users GuideProTool/ProSINUMERIKOptionion Kit

    Descriptionof FunctionsHMI ProgrammingPackage

    Description ofFunctionsOSACA Program-ming Package

    SINUMERIK SINUMERIK SINUMERIK

    840D/840Di/810D/FM--NC

    840D/840Di/810D/FM--NC

    840D/810D/FM--NC

    Installation GuideHMI ProgrammingPackage

    SINUMERIK

    840D/840Di/810D/FM--NC

    Users ManualHMI Environment

    SINUMERIK

    840D/840Di/810DFM--NC

    Document Structure

  • 7/23/2019 Benutzer Eng

    3/527

    Valid for:

    Component Softwareversion

    HMI 7.2

    Edition 07.2008

    HMIProgramming PackagePart 1

    SINUMERIK 840D/840Di/SINUMERIK 810D/FM--NC

    Users ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers ManualUsers Manual

    Introduction 1

    General information 2

    HMI Fundamentals 3

    SINUMERIK User Interface 4

    SystemStructure 5

    Regie 6

    Sequence Control 7

    Interface between

    HMI and NCK/PLC 8

    Alarms (Alarm handling) 9

    Data Management 10

    Access to NC and Drive

    Machine Data 11

    Reference 12

    Sample Application 13

    Appendix

    A

    Index I

  • 7/23/2019 Benutzer Eng

    4/527

    SINUMERIK documentation

    Printing history

    Brief details of this edition and previous editions are listed below.

    The status of each edition is schown by the code in the Remarks column.

    Status code in the Remarks column:

    A New documentation.. . . . .B Unrevised reprint with new order No.. . . . .C Revised edition with new status.. . . . .

    Edition Ident--No. Remarks

    Preliminary 570886.3805.2j A08.95 570 886.3806.23 C10.95 570 886.3809.31 Supplement10.95 570 886.3806.31 C12.96 570 886.3806.34 C03.97 570 886.3809.36 Supplement03.97 570 886.3806.36 C08.97 570 886.3806.42 C12.97 570 886.3809.42 Supplement12.97 570 886.3806.43 C08.98 570 886.3806.44 Supplemenz12.98 570 886.3806.51 C

    11.99 570 886.3806.52 Csince 2000 none C

    MarkenSIMATICr, SIMATIC HMIr, SIMATIC NETr, SIROTECr, SINUMERIKrund SIMODRIVErsindeingetragene Marken der Siemens AG. Die brigen Bezeichnungen in dieser Druckschrift knnen Markensein, deren Benutzung durch Dritte fr deren Zwecke die Rechte der Inhaber verletzen knnen.

    Siemens quality for software and training to DIN ISO 9001,Reg.Nr.1258--03

    This publication was produced with Interleaf 7.The reproduction, transmission or use of this document or itscontents is not permitted without express written authority. Offenderswill be liable for damages. All rights, including rights created by patentgrant or registration of a utility model or design, are reserved.

    Siemens AG 2008

    Other functions not described in this documentation might beexecutable in the control. This does not, however, represent anobligation to supply such functions with a new control or whenservicing.We have checked that the contents of this document correspond tothe hardware and software described. Nonetheless, differences mightexist and therefore we cannot guarantee that they are completelyidentical. The information contained in this document is, however,reviewed regularly and any necessary changes will be included in thenext edition. We welcome suggestions for improvement..

    Subject to change without proir notice.

    Siemens--AktiengesellschaftPrinted in the Federal Republic of Germany

    3ls

  • 7/23/2019 Benutzer Eng

    5/527

    07.08

    iSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Dear customer

    We would like to congratulate you on your decision in selecting the OEM package. Now you have access

    to everything to implement your operator control interface or 840D NCK functions on SINUMERIK 840. It

    goes without saying that you can also purchase existing WINDOWS software packages and integrate

    them into the HMI. The documentation provided shows how you do this.

    Before you continue to read the paragraphs in small print below, please observe the following information.

    Description of software and hardware

    The HMI environment (OEM package) is part of the HMI programming package.

    With SINUMERIK 840D/840Di/810D/FM--NC the following software and hardware descriptions are used:

    S MMC103-software --> HMI Advanced

    S MMC100-software --> HMI Embedded

    S MMC103-hardware --> PCU 50

    S MMC100-hardware --> PCU 20

    S OP031/OP032/OP032S --> OP012/OP015

    Alterations for the HMI programming package

    The following alterations arise for the HMI programming package:

    S runs under Windows NT Service Pack 6

    S we recommend applications to be programmed in Visual Basic 6.0

    S the additional DOS box function is no longer part of SINUMERIK

    S DDECTL.VBX and MENUGEN are no longer part of the delivery

    S DCTL.VBX is replaced by DCTL.OCX

    S REGCTL.VBX is replaced by IregSvr.DLL

    You have everything and you can commence. We also want to support you in the following phase, as well

    as when your development has been completed and the complete machine has been shipped to your

    customer.

    However, our support goes even further. SIEMENS service technicians are available over the machine

    lifetime to keep your machine up and running thus ensuring customer satisfaction-- your customer!

    We would now like to show you what is available and how you can access it.

    The HMI package

    You have purchased the software and the documentation and you are now in a position to write software

    applications for SINUMERIK. If you would like some tips on how you can use SINUMERK interface, then

    you can use our hotline. This is also true if you need troubleshooting help or if the WINDOWS API (Ap-

    plication Programmers Interface) does not function as it should. The first three months of hotline service

    are free--of--charge as it is included in the OEM package.

  • 7/23/2019 Benutzer Eng

    6/527

    07.08

    ii Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    The software update service

    This package is a support package which is included in the OEM package and which is intended to help

    you after you have purchased your OEM package. It consists of:

    S Hotline supportS Upgrades/updates

    The hotline support service can be ordered under a separate order number and should ideally be purcha-

    sed directly with an OEM package. The minimum time is 12 months.

    Call our hotline if you have questions

    You are just developing your SINUMERIK OEM application and all of a sudden Murphys law hits. You

    simply cant move on. Or you are in the conceptual phase of your software project and require support as

    to how your idea can be best realized. Then simply fax our OEM hotline. We will help you before you loose

    time by experimenting.

    Let us know your name, telephone-- or fax number and your question on the attached fax form. We will call

    you back the same day and respond to your question.

    If you should need support when designing or developing your software project please contact your Sie-

    mens sales agent. Our Center of Competence at Stuttgart will help you with pleasure.

    Why the fax form?

    The hotline is not only one person -- it is backed up by the whole OEM team. Depending on your particular

    problem, that expert will call you back. That saves both parties time and increases the quality of the hot-

    line.

    We will pay for the telephone call -- not you.

    In difficult cases we can contact our own development group or even the professional Microsoft hotline

    (we will also pay for these costs) so that we can help you quickly.

    Why is this hotline not free--of --charge?

    Up until now, you probably were used to being helped by a SIEMENS employee without having to order a

    hotline service. That will remain the same. This is also true for the initial phase (the first three months)

    where experience has shown that the most questions occur.

    In the case of an OEM development, you dont use solely SIEMENS generated functions. You use your

    own development tools and you use third--party software and create your own new functions. You are a

    system developer and you have your own software concepts.

    This should be the case in an open system so that you can fully utilize all of the possibilities. By--the--way

    the hotline services arent quite so simple as several years ago when SINUMERIK was still a closed, pro-

    prietary system. Of course these costs could be included in a higher OEM package price, but we are of

    the opinion that you should only purchase that performance which you really require.

  • 7/23/2019 Benutzer Eng

    7/527

    07.08

    iiiSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    The software update service

    The hotline is included in the software update service.

    Hasnt it already happened to you? You worked for a long time on a specific function only to finally find out

    from a hotline that you have a software where this is not even possible? Software has been available for

    several months now which would do everything for you at the click of a mouse. And now you must order

    new software which has to go through purchasing--, planning, finance-- and the sales departments -- a

    lengthy process.

    This will all be a thing of the past with our software update service. You will always receive the latest soft-

    ware and you yourself can decide whether you use it.

    Your purchasing department is protected from any surprises and can make risk--free calculations. You can

    concentrate on the technical aspects of the project without having to wait for a software shipment which

    could endanger the development schedule.

    Service Guideline

    The Service Guidelines contain instructions for the development of OEM applications. With the checklist ofthe Guideline one of our authorized service technicians checks, if it is possible to service your Siemens

    NC together with your applications at reasonable cost

    Why compliance with the Service Guidelines?

    When you comply with the Service Guidelines, you have strong arguments with your customers. Our goal

    is to ensure that a differentiation is made between serious, professional OEM developments and quick

    and dirty solutions : Because your product should have a good image.

    This service is of course not possible if just any hardware and software is incorporated in SINUMERIK, so

    that the service technician might even think that it doesnt involve a SINUMERIK. Or do you want to track

    down every machine although there is a SIEMENS service technician close by who can troubleshoot far

    more cheaply?

    Ordering is easy

    The software update service is ordered just like normal hardware or software. For more information con-

    tact your local SIEMENS representative.

  • 7/23/2019 Benutzer Eng

    8/527

  • 7/23/2019 Benutzer Eng

    9/527

    ixSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Preface

    Structure of thisdocumentationThe SINUMERIK documentation is organized in three parts:

    S General documentation

    S User documentation

    S Manufacturer/Service documentation

    Nhere Informationen zu den Druckschriften fr alle SINUMERIK-Steuerungenerhalten Sie von Ihrer SIEMENS-Niederlassung.

    Target group

    This documentation is intended for machine tool builders who equip machine toolswith SINUMERIK 840D and SIMODRIVE 611D.It is written for the advancedprogrammer who is familiar with WINDOWS programming and who is experiencedin the programming language Visual Basic. Some parts require knowledge of theprogramming language C++.

    Detailed knowledge of the structure of the CNC is a good base for efficient work onHMI projects.

    Goals

    This documentation introduces the possibilities of carrying out specialmanufacturing technologies to the machine tool builders using SINUMERIK 840D

    as OEM. The emphasis is put on functional expansions of the HMI which getpracticable with customer--specific WINDOWS applications.

    Standard scope of delivery

    The documentation of the OEM package MMC is organized in five parts:

    Introduction Chapter 1

    Programming instructions Chapter 2 to 10

    Reference Chapter 11

    Applications Chapter 12

    Appendix

    The introduction briefly describes the open architecture of the HMI component ofthe SINUMERIK 840D and possible OEM applications. You will also find a historyof the earlier versions with notes concerning the new functions of the latest SWrelease.

    The programming instructions explain how to install the HMI package, how to usethe development tools, how to link own applications (consisting of code and data)to the HMI basic system and how to test the new functions. Background informa-tion in the Chapters 5 to 10 enable the user to take advantage of all features.

  • 7/23/2019 Benutzer Eng

    10/527

    Preface 07.08

    x Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    The Reference part contains a list of the programming interfaces and their defini-tions in tabular form.

    The Applications part provides sample applications and user recommendationssupplied on disk. Functional extent and installation of the samples are explained in

    Chapter 12.

    Help

    For better orientation see the following documents:

    1. List of abbreviations and glossary Appendix

    2. Bibliography Appendix

    3. Index Index

    Troubleshooting

    If you encounter problems while installing or using the OEM--package, werecommend to read chapters 2.4 and 2.5 prior to a hotline--call: These chapterstreat common errors and show how to solve them.

    Important

    This documentation is valid for:HMI Programming Package, software release 6.2 for numeric control SINUMERIK840D/810D/FM--NC, PCUxx and operators panel OP 012/015, MMC 103 andoperators panel OP 031/032.

    Notes

    This documentation uses the following conventions:

    Note

    This symbol always appears in the documentation, when importnt information isconeyed.

  • 7/23/2019 Benutzer Eng

    11/527

    Preface07.08

    xiSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Important

    This symbol always appears in the documentation, when important information isconveyed.

    Warnings

    Following warning notes marking different levels of severity are used in thedocumentation:

    !Warning

    The device may only be used for the purposes intended by the catalog and the

    technical description, as well as only in conjunction with non--Siemens devices andcomponents recommended or permitted by Siemens.

    The proper and reliable operation of the product requires transport and storageaccording to the relevant standards and instructions, proper mounting and installa-tion, as well as operation and maintenance by qualified personnel.

    !Danger

    This symbol appears whenever death, severe bodily injury or substantial materialdamagewil occur, if the appropriate precautions are not taken.

    !Danger

    This symbol appears whenever death, severe bodily injury or substantial materialdamagecould occur, if the appropriate precautions are not taken.

    !

    Caution

    This symbol appears, whenever minor bodily injury or material damagecan occur,if the appropriate precautions are not taken.

  • 7/23/2019 Benutzer Eng

    12/527

    Preface 07.08

    xii Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Caution

    This warning notice (without warning triangle) means that a material damage canoccur if the appropriate precautions are not taken.

    !Attention

    This warning notice means that an undesired event or an undesired statuscanoccur if the relevant notes are not observed.

    Technical notes

    Trademarks

    IBM is registered trademark of International Business Corporation.MS--DOS,

    MS, Microsoft, WINDOWStVisual Basict, Visual C++tand Excel areregistered trademarks of Microsoft Corporation.

    Effect of changes

    When data are modified (e.g. machine data), the time when the new values geteffective (e.g. after PowerOn or immediately) is worth knowing. Therefore this timeis always specified.

    Important

    Before commissioning the numeric control, pay attention to the hints of thecorresponding documentation. Order numbers may be taken from the cataloguesNC, SD, AR or contact your local SIEMENS--service.

    Operation is prohibited until it is guaranteed, that the machine is in accordancewith legal requirements 89/392/EWG.

  • 7/23/2019 Benutzer Eng

    13/527

    Preface07.08

    xiiiSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Manufacturers note

    The OEM package HMI includes three components:

    S HMI Advanced-standard softwareS OEM tools, examles and sourcesS Remote diagnosis

    From these three software components only the HMI Advanced standard softwareis intended to be stored permanently on the PCU50.

    When using an HMI component as a development computer, remove the other twosoftware components OEM tools, examples and sources and remote diagnosisfrom the hard disk before delivering it to your customer since these are licensedproducts.

    Manufacturers note

    When developing additional features realize, that exporting derivative software andthe related technical information might require official approval -- e.g. because ofthe type and intended use of the derivative software. This particularly applies tothe SINUMERIK controls, if the derivative software is installed there.

    The detailed regulations concerning this subject are part of the OEM contract.

    Important

    This symbol marks preliminary features. These are features that may be used fortesting purposes during the development process only.They are not intended for released products that are to be run on your customerscontrol.

    Note

    Whenever we use grammatical forms for persons in the masculinum, this will al-ways happen for pure practical and stylistic considerations; the information provi-

    ded herein naturally also applies to femal users, female engineers, female pro-grammers etc.

  • 7/23/2019 Benutzer Eng

    14/527

    Preface 07.08

    xiv Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Notes

  • 7/23/2019 Benutzer Eng

    15/527

    xvSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Contents

    1 Introduction 1-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.1 SINUMERIK 840D as an open system 1-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2 Open system architecture of the Human Machine Interface (HMI) 1-23. . . . . .

    1.3 Which parts of the documentation are of interest for me 1-24. . . . . . . . . . . . . .

    1.4 Development environment 1-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.5 Support 1-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.6 Typographic conventions 1-29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2 General information 2-31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2.1 Features of the component PCUxx 2-31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2.2 Optimizing the development environment 2-34. . . . . . . . . . . . . . . . . . . . . . . . . . .

    2.3 Problems during operation and how to solve them 2-34. . . . . . . . . . . . . . . . . . .

    2.4 Transfer of VB applications from 16Bit to 32Bit 2-38. . . . . . . . . . . . . . . . . . . . . .

    2.5 Notes for the OEM user on Hard disk Backup/Restore with Ghost 2-44. . . .

    2.6 Essential Information fpr Programmers 2-46. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3 Basics of the HMI component 3-47. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3.1 HMI as a part of SINUMERIK 3-48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.1.1 Operator component 3-48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.1.2 Options 3-50. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3.2 Software architecture of the HMI 3-51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.1 The layer of the HMI software 3-51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.2 Regie 3-52. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.3 Sequence Control 3-54. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.4 NCDDE Server 3-56. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.5 Alarm server 3-59. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.6 Data Management 3-61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3.3 Communication 3-65. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3.1 MPI interface 3-65. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3.2 Transfer of OEM data to the control 3-67. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3.4 OEM applications 3-69. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4 Design of the graphical user interface 4-71. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.1 User interface of the standard NC 4-71. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.1.1 Info field (header) 4-73. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.1.2 Application area 4-74. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.1.3 Interactive field 4-76. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.1.4 Softkey bars 4-76. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.2 How to create an application with the OEM--package 4-77. . . . . . . . . . . . . . . . .

    4.3 Adapting the standard application to your needs 4-79. . . . . . . . . . . . . . . . . . . . .4.3.1 Embedding an OEM softkey in the area MASCHINE 4-81. . . . . . . . . . . . . . . . .

    4.4 Adapting the standard interface (regie.ini, mmc.ini) 4-83. . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Benutzer Eng

    16/527

    Contents 07.08

    xvi Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    4.5 The application aeditor 4-85. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5 System structure 5-87. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5.1 DH.INI 5-88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5.2 MBDDE.INI 5-88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.3 MMC.INI 5-88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5.4 NETNAMES.INI 5-90. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5.5 OEMFRAME.INI 5-91. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5.6 REGIE.INI 5-93. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5.7 S7DPMPI.INI 5-94. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6 Regie 6-95. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.1 Concept of the Regie 6-96. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.2 Integration of OEM applications 6-99. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.3 Application with sequence control 6-100. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.1 The initialization file REGIE.INI 6-100. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.2 Section [Version] 6-101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.3 Section [SystemDllCoonfiguration] 6-102. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.4 Section [MMCDllConfiguration] 6-102. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.5 Section [StartupConfiguration] 6-103. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.6 Section [TaskConfiguration] 6-105. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.7 Section [Miscellaneous] 6-117. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.8 Section [CommandToTask] 6-122. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.9 The initialization file language.INI 6-122. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.10 Section [HSoftkeyTexts] 6-123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.3.11 Section [VSoftkeyTexts] 6-124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.12 Section [GeneralTexts] 6-124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.13 Section [HSoftkeyIcons] 6-124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.14 Section [HSoftkeyTextsShort] 6-124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3.15 Section [MsgBox] 6-125. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.4 Functions of the RegieServer 6-126. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.4.1 Switching tasks 6-128. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.4.2 Switching tasks in the hidden area 6-130. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.4.3 Switching tasks (to hidden area) immediately 6-134. . . . . . . . . . . . . . . . . . . . . . . .6.4.4 Screen control 6-136. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.4.5 Locking tasks 6-138. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.4.6 Functions for managing the command line 6-139. . . . . . . . . . . . . . . . . . . . . . . . . .

    6.4.7 Subsystems 6-141. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.4.8 Miscellaneous 6-142. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.5 Events of the RegieServer 6-146. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.6 Application without sequence control 6-152. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.6.1 Entry in the file REGIE.INI 6-152. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.6.2 Entry in the file OEMFRAME.INI 6-154. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6.7 Embedding an OEM application in the HMI 6-164. . . . . . . . . . . . . . . . . . . . . . . . .

    6.8 Adding help support 6-165. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.8.1 Creating an alarm help file 6-168. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.8.2 Creating an own help mechanism 6-168. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Benutzer Eng

    17/527

    Contents07.08

    xviiSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    7 Sequence control 7-169. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.1 Introduction 7-170. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.2 Your first OEM application 7-172. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.2.1 Directory structure 7-173. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.2.2 Directory structure of SW 6 7-175. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.2.3 Building the framework 7-176. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.2.4 Adding an additional window / form 7-179. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.3 Files of the Sequence Control 7-181. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.3.1 Initialization file 7-181. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.3.2 Modules and forms of the Sequence Control 7-182. . . . . . . . . . . . . . . . . . . . . . . .7.3.3 Modules of the application 7-183. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.3.4 Temporary files of the Sequence Control 7-183. . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.4 Language support for your applications 7-185. . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.4.1 User interface and language 7-185. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.4.2 RC files for texts 7-186. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.4.3 Creating the language DLL 7-189. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.4.4 Asian languages 7-193. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.4.5 Language selection 7-194. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.5 Types of windows 7-195. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.5.1 Application--modal windows 7-198. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.5.2 Displaying messages/notes 7-199. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.6 Menu control 7-200. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.6.1 State table 7-200. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.6.2 State transitions 7-204. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.7 Procedures and functions 7-207. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.1 State control 7-210. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.7.2 Inquiry functions 7-213. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.3 MDIChild functions 7-216. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.4 Locking/unlocking softkeys 7-220. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.5 Softkey text functions 7-225. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.6 Displaying texts 7-233. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.7 Modal window functions 7-234. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.8 Action functions (dynamic change of the state matrix) 7-239. . . . . . . . . . . . . . . .7.7.9 Functions for dynamic graphic resolution 7-243. . . . . . . . . . . . . . . . . . . . . . . . . . .7.7.10 Functions for reading/ writing INI file entries 7-247. . . . . . . . . . . . . . . . . . . . . . . . .

    7.8 Horizontal and vertical softkeys 7-250. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.8.1 Icons for softkeys 7-252. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.8.2 Configuring the softkey bars 7-253. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.8.3 Extending the Softkey bar 7-254. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.8.4 New functions as from software version 6.2 7-255. . . . . . . . . . . . . . . . . . . . . . . . .

    7.9 Global variables of the Sequence Control 7-257. . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.10 The Menu Tree Generator 7-258. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.11 Dynamic Changeover of the Graphical Resolution 7-259. . . . . . . . . . . . . . . . . . .

    8 Interface HMI NCK/PLC 8-261. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1 General 8-262. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2 Basics of DDE 8-263. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Benutzer Eng

    18/527

    Contents 07.08

    xviii Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    8.3 Configuring the NCDDE Server 8-264. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.3.1 The initialization file MMC.INI 8-264. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.3.2 Command files of the NCDDE Server 8-267. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.3.3 Connecting several NCs 8-268. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.4 Establishing a DDE connection 8-271. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.4.1 Establishing a DDE connection with Visual Basic 8-271. . . . . . . . . . . . . . . . . . . .8.4.2 Establishing a DDE connection with Visual C/C++ 8-274. . . . . . . . . . . . . . . . . . .8.4.3 Establishing a DDE connection from MS Excel 8-275. . . . . . . . . . . . . . . . . . . . . .

    8.5 Variable Service 8-276. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.5.1 Single variable access 8-278. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.5.2 Array variable access 8-279. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.6 File transfer Services (Domain Services) 8-283. . . . . . . . . . . . . . . . . . . . . . . . . . .8.6.1 Transferring data between the HMI and the NC/PLC 8-283. . . . . . . . . . . . . . . . .8.6.2 Extended copy functions between the HMI and the NC/PLC 8-292. . . . . . . . . . .8.6.3 MAP--functions between domains 8-295. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.7 PI Services 8-299. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.8 More NCDDE Server commands 8-302. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.9 OEM--Visual Basic Controls (OCX files) 8-306. . . . . . . . . . . . . . . . . . . . . . . . . . . .8.9.1 File DDECTL.VBX 8-306. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.9.2 Filei DCTL.VBX 8-307. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.9.3 File DCTL.OCX 8-307. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.9.4 Applying DCTL.OCX 8-313. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.10 Diagnosis features for NCDDE--access 8-318. . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.10.1 Testing functions of the NCDDE Server 8-318. . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.10.2 State of a connection 8-320. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.10.3 Troubleshooting 8-321. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.11 How to configure the NCDDE Server for access via network 8-322. . . . . . . . . .

    8.12 Extensions of the NCDDE server 8-326. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.12.1 Multi variable service 8-326. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.12.2 Indirect item specification 8-327. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.12.3 New access modifications 8-327. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.13 Accessing global user variables GUD, SGUD, MGUD, UGUD,GD3 to GD9 8-328. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.14 Online--help for variables 8-333. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.15 Troubleshooting 8-334. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.15.1 Connection break down with NCK/PLC 8-334. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.15.2 ...didnt respond to DDE-Initiate 8-334. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.15.3 Form Load takes long because many Hotlinks are being established 8-334. . .8.15.4 First Execute commando doesnt work 8-335. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.16 Determining the active bus nodes 8-335. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.17 External HMI communications via a company network (--X130) 8-335. . . . . . . .8.17.1 Prerequisites 8-335. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.17.2 Procedure 8-336. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9 Alarms (Alarm Handling) 9-339. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.1 Communication 9-340. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Benutzer Eng

    19/527

    Contents07.08

    xixSiemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    9.2 Types of Services (DDE link mode) 9-341. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.3 Services of the Alarm DDE Interface 9-342. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.3.1 Alarm Server commands 9-342. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.3.2 Advise variables of the Alarm Server 9-344. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.3.3 Request variables of the Alarm Server 9-348. . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.4 Initializing the Alarm Server 9-351. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.4.1 The file MBDDE.INI 9-351. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.4.2 The file NETNAMES.INI 9-358. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.4.3 Alarm text files 9-359. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.5 Alarm areas of the Sinumerik 840D 9-361. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    10 Data Management 10-363. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    10.1 General 10-364. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    10.2 Directory structure of the Data Management 10-365. . . . . . . . . . . . . . . . . . . . . . .10.2.1 Properties of the elements in the directory tree 10-366. . . . . . . . . . . . . . . . . . . . .

    10.3 Elements in the MMC Data Scheme 10-371. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    10.4 Functions of the Data Management Server 10-377. . . . . . . . . . . . . . . . . . . . . . . .10.4.1 Establishing DDE connections with the Data Management Server 10-377. . . . .10.4.2 Request Jobs 10-379. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.4.3 Simple Execute jobs 10-387. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.4.4 Complex Execute jobs 10-396. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    11 Access to NC and Drive Machine Data 11-409. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    11.1 Data--Cache (DcApi.dll interface) 11-409. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    11.2 COM Server AccVar.exe (Md Interface) 11-427. . . . . . . . . . . . . . . . . . . . . . . . . . .

    12 Reference 12-435. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.1 Overview 12-435. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.1.1 Areas of the NC 12-435. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.1.2 File systems of the NC 12-436. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.1.3 Domain Service 12-439. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.1.4 PI Service 12-439. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.1.5 Data formats 12-442. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.2 Variable definition 12-442. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.2.1 General 12-442. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.2.2 Shared modules of active and passive NCU file system 12-443. . . . . . . . . . . . . .

    12.3 Module types for the active file system 12-446. . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.3.1 Examples 12-448. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.4 Machine data 12-449. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.5 PLC data 12-450. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.5.1 Introduction 12-450. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.5.2 Summary of the PLC data 12-452. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.6 PI Services 12-457. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.7 NCDDE -- Error messages 12-459. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.1 Variable LastError 12-459. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.2 General error class definitions 12-460. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.3 Definition of the Error Region 12-461. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Benutzer Eng

    20/527

    Contents 07.08

    xx Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    12.7.4 Details for general = 1, 4 and 6 12-461. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.5 Details for general = 2 12-466. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.6 Details for general = 3 12-467. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.7 Details for general = 5 12-467. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.8 Detailsfor general = 7 12-468. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.7.9 Details for general = 8 12-46. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    912.7.10 Details for general = 9 12-471. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.8 Error messages of the Data 12-472. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12.9 Directory structure of the Data Management 12-473. . . . . . . . . . . . . . . . . . . . . . .

    12.10 Software Information 12-485. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.10.1 File extensions 12-485. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.10.2 Alarm numbers 12-487. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.10.3 Drivers 12-488. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.10.4 Supported languages and Language shortcuts 12-492. . . . . . . . . . . . . . . . . . . . .

    12.10.5 Assignment of ANSI tables and fonts 12-493. . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.11 Hardware information 12-494. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.11.1 Memory addresses 12-494. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.11.2 Interrupt requests 12-495. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.11.3 Input/output addresses MMC 12-496. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.11.4 More details on the PCU50 hardware 12-497. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13 Applications 13-499. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.1 Sequence Control / Application change--over 13-499. . . . . . . . . . . . . . . . . . . . . . .

    13.2 NCDDE Server 13-500. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.3 Alarm Server 13-500. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.4 Example Regie/OEMFRAME 13-501. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13.5 Data Management Server 13-502. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.6 NCDDE Server for PLC data 13-502. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.7 Positioning WINDOWS applications 13-503. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.8 Example Data exchange between Visual Basic and DLL 13-503. . . . . . . . . . . . .

    13.9 Functions of the Sequence Control 13-503. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.10 Sequential processing of several asynchronous jobs 13-504. . . . . . . . . . . . . . . .

    13.11 Starting an application with an OEM softkey and realizing a DCTLconnection 13-504. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    13.12 Operating a 32--bit C++ application with softkeys 13-505. . . . . . . . . . . . . . . . . . .

    13.13 Embedding Expanded the Operator Interface inMMC--OEM applications 13-505. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    A Appendix N-507. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    A1 Abbreviations N-508. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    A2 Technical terms N-510. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    A3 Reference N-512. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Index I-523. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Benutzer Eng

    21/527

    1-21Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Introduction

    The flexible numeric control SINUMERIK 840D / 810D/FM--NC provides the ma-chine tool builder many ways to extend and adapt internal functions. Starting outwith the fast operation of the standard NC--kernel with its basic features and astandard user interface, they can carry out manifold extensions and create inter-face designs in a customer--specific manner.

    1

  • 7/23/2019 Benutzer Eng

    22/527

    Introduction

    1.1 SINUMERIK 840D as an open system

    07.08

    1-22 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    1.1 SINUMERIK 840D as an open system

    ComponentsCustomer demands on the NC have three technical aspects:

    hardware supplements

    design of a user interface (HMI)

    extension of the NC--kernel functions.

    Open system

    The open system architecture of the SINUMERIK 840D provides a suitable pro-gramming interface for each of the above aspects.

    Hardware--supplements

    S PLC modules max. 3 SIMATIC--S7 racks containing:input and output modules, FC modules...

    S PCUxx components PCI/ISA adapter with 2 slots for:-- measuring device-- network card-- floppy disk drive-- PC card adapter

    S NCK components fast NCK environment, digital and analoginput and output.

    S serial link V.24 or MPI interface for:communication, networking, PGs, PCs.

    HMI design

    S PLC modules in conjunction with PLC program:lamps, buttons, mini--control panels

    S HMI components in connection with PCI/ISA adapter:driving operation and display components

    via standard PC boardsS HMI applications in conjunction with the OEM package HMI

    Extension of NC-- functions

    S PLC modules in conjunction with PLC program:operation of peripheral equipment andadditional axes

    S Compile cycles form the most powerful method for providing theNC--kernel with fast additional functions.

  • 7/23/2019 Benutzer Eng

    23/527

    Introduction

    1.2 Open system architecture of the Human Machine Interface (HMI)

    07.08

    1-23Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Table of configuration/OEM domains

    Table 1-1 Configuration and OEM domains of SINUMERIK 840D

    Range HMI

    application OEM application

    developmentenvironment

    WINDOWS on industrial PCs

    connection Regie Sequence Control

    access to data OPC/COM

    storage medium harddisc

    programminglanguage Visual BasicVisualC++

    1.2 Open system architecture of the Human Machine Inter-

    face (HMI)

    New feature

    The open system architecture of the Human Machine Interface (HMI) is a new fea-ture of the SINUMERIK 840D / 810D / FM--NC in the consequent pursuit to offer acompletely open numeric control to the machine tool builder as an OEM. This ap-

    plies to hardware as well as to software.

    Open hardware

    The PCU503 is a standard PC that supplies several hardware interfaces for:

    mass storagefloppy disk drivePCI/ISA box for PCU502 serial interfaces and 1 parallel interface.

  • 7/23/2019 Benutzer Eng

    24/527

    Introduction

    1.3 Which parts of the documentation are of interest for me

    07.08

    1-24 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Open software

    The standard software of HMI Advanced includes the

    operating system MS Windows NT

    SINUMERIK standard user interface,using which standard and adapted software applications can be run.

    A standard PC with MS Windows NT as operating system offers many ways todesign user specific applications. The structure will be described in more detail inChapter HMI fundamentals.

    1.3 Which parts of the documentation are of interest for me

    Chapter 3.2 contains an explanation of the technical terms used in Chapters 5 to

    10.

    It depends on your special application which parts of the documentation are of in-terest for you beyond that.

    Integrators

    The HMI standard user interface satisfies the needs of your NC. However, youwant to use the PC for other purposes, too. Therefore you additionally integratethird party applications, e.g. CAD programs, using additional softkeys.

    Modifiers

    You do not really want to know how the HMI works, but you still want to slightlymodify the standard. Use the OEM calls to the standard applications.

    Interface designers

    You missyourfunction on the HMI standard interface. Therefore you add own ap-plications which can be operated like the HMI standard interface by softkeys andthe operating panel (e.g. for configuring and displaying NC user data).

  • 7/23/2019 Benutzer Eng

    25/527

    Introduction

    1.3 Which parts of the documentation are of interest for me

    07.08

    1-25Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Power User

    Yourcustomers buyyourmachine. You do not mind the standard user interface ofthe SINUMERIK. Your Corporate Identity is supposed to dominate the interface ofthe control.

    Interfaces of the OEM package

    A system of interfaces is provided which can be variably combined according tothe requirements:

    Server for accessing NC data:

    NCDDE ServerAlarm ServerData Management Server

    Regie

    Sequence Control

    StandardNC applications, e.g. machine, parameter

    The table below lists the interfaces that might be of interest for you. You need touse those printed in bold letters in any case, the others depending on the range offunctions of your application.

    Table 1-2 Who needs which interfaces of the OEM package

    Integrators Modifiers Interfacedesigners

    Power users

    Regie Regie RegieSequenceControl

    Sequence Control

    NCDDE-Server NCDDE-Server NCDDE-Server

    Alarm Server Alarm-Server Alarm-Server

    Data ManagementServer

    Data ManagementServer

    Data ManagementServer

  • 7/23/2019 Benutzer Eng

    26/527

    Introduction

    1.4 Development environment

    07.08

    1-26 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    1.4 Development environment

    OverviewIn order to develop customer--specific applications which are to be executed onHMI the following equipment is required:

    standard PC for program development

    standard software tools for WINDOWS applications

    HMI Programming Package as basis for developing customer--specific programs

    numeric control SINUMERIK 840D / 810D / FM--NC for testing customer applica-tions in the system environment

    software engineers with sufficient know--how of NC systems and experience in mo-

    dern high level languages.

    Hardware

    HMI applications are developed on standard PCs under the operating system MSWindows NT.

    System requirements are listed in Chapter 2 General information.

    Software

    HMI customer applications are written using standard software development toolslike :

    S Visual Basic VB 6

    S Tools for adding texts to the DLLs (e.g. Visual C++)

    S HMI Progamming Package

    The required extent of the external tools and recommendations for their use arelisted in Chapter 2 General information.

    Test tools

    Applications developed under WINDOWS with the OEM package HMI areS tested on the PC

    S simulated in a model environment and

    S transferred to HMI.

    The final system test is carried out under realistic operating conditions on the tar-get hardware, a complete NC with the necessary configuration.

  • 7/23/2019 Benutzer Eng

    27/527

    Introduction

    1.5 Support

    07.08

    1-27Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Demands on the software engineer

    Developers of HMI applications work at the boundary of general WINDOWS pro-gramming and NC--specific requirements. They must therefore be familiar withboth fields and additionally they should be experienced in the organization of soft-

    ware projects.

    Experience with PCs

    This includes especially:

    S experience in carrying through development projects based on PCs

    S detailed experience in programming DOS and WINDOWS

    S knowledge of object--orientated problem solving and programming

    S detailed experience in Visual Basic Professional

    S experience with a resource editor, e.g. Visual C++

    Knowledge of the NC--subject

    The requirements basically depend on the technical demand of the problem:

    S knowledge of the software architecture of the NC

    S familiarity with the necessary data

    S experience in the design of technology--specific and user--friendly user interfa-ces

    1.5 Support

    The OEM user is provided several kinds of support:

    -- training-- software support service with hotline-- hard-/software development service

  • 7/23/2019 Benutzer Eng

    28/527

    Introduction

    1.5 Support

    07.08

    1-28 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Training

    The SINUMERIK concept for graded training offers among others:

    S operating and programming of the NC control

    S setting into operation and maintenanceS OEM applications

    and leads to an advanced understanding of the structure of the numeric controland the MTBs diverse possibilities of adapting the base system to serve his ownpurposes.

    The know--how needed for an efficient use of the development tools can be acqui-red in courses at the SIEMENS training center.

    Software Update Service

    With the software update service the user purchases support for the next releases(update-- and upgrade--versions).

    update An update is a software version with a higher version--number.It contains bug fixes.Example: update from release 3.4 to 3.6

    upgrade An upgrade is a software with a higher releasenumber. It offers new features.Example: upgrade from release 3.6 to release 4.2

    hotline The hotline for the OEM--package is part of the software updateservice.

    Hotline

    Together with the OEM package HMI the customer is provided three months ofsupport by the hotline. This period can be extended by further 12 months in thesoftware support contract.

    Fax--hotline

    You can contact the OEM hotline by calling the Technical Support Center in Erlan-gen:

    Phone: +49 (0) 180 50 50 222

    Fax: +49 (0) 180 525 8009

    E--Mail: [email protected]

  • 7/23/2019 Benutzer Eng

    29/527

    Introduction

    1.6 Typographic conventions

    07.08

    1-29Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Hardware and software--service

    After the customer requirements are split up into

    hardware supplements

    design of HMI operator interfaceextensions of the NC functions

    and the question of how to realize

    PLC programmingWINDOWS development in HMIOEM extension of the NCK with Compilecycles

    is decided,

    the question of execution by eitherown staff ororder to external suppliers

    turns up.Here outsourcing to the SIEMENS development department will be economical.Experienced programmers and system specialists will tackle the task on time andfor a fixed price.

    1.6 Typographic conventions

    Besides some text passages this manual also contains examples of programs, ex-tracts from programs and instructions for the user for pressing certain keys or en-

    tering certain combinations of keys.In order to emphasize these components of the documentation they are markedwith different fonts or styles.

    These typographic conventions follow the conventions used in the manuals of theprogramming languages Visual Basic and Visual C++. The conventions are listedin the chapter Introduction under Document Conventions.

    Table 1-3 Typography of text components in this users manual

    example meaning and description

    Sub, If, ChDir reserved keywords of the programming

    language:bold, initial letter capitalized

    BackColor, Click, Debug names of properties, events, special objects:initial letter capitalized

    setup user keyboard entry:bold

    event-driven within texts: first appearance of a term,put emphasis on a text passage italic

  • 7/23/2019 Benutzer Eng

    30/527

    Introduction

    1.6 Typographic conventions

    07.08

    1-30 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Table 1-3 Typography of text components in this users manual

    example meaning and description

    eventname within programs:

    place--holder for information to be supplied bythe user:italic

    [expressionlist] within programs:optional entry inside square brackets

    {While|Until} within programs:selection from two or more items:inside curved brackets

    S yn t ax e r ro r user defined variable and error messagestype Courier

    S ub H e ll o Bu t to n _C l ic k ( )

    R e ad o ut . Te x t = H al l o! E nd S ub

    program code:

    type Courier

    R ea d ou t .T e xt = T hi ss hou ld b e ty ped a ll i no ne l in e

    program code should be typed all in one lineof the code window:identifier icon for linecontinuation:

    CONSTANT.TXT file name:capital letters

    ENTER, CTRL+R names of keys and combination of keys:small capital letters

    ALT+F1 combination of keys

    + -- sign between key

  • 7/23/2019 Benutzer Eng

    31/527

    2-31Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    General information

    2.1 Features of the component PCUxx

    Overview

    This Chapter is a compilation of some features of the component

    PCU xx:

    -- Improved handling of the registry

    -- Shutting down the PCUxx

    -- Locking key combinations

    Improved handling of the registry

    The Windows system environment for standard Windows and that for MMC will nolonger be distinguished or separately managed like up to SW 05.01.26. There willbe only one system environment for the two cases. This allows the user to handle

    the system environment (REGISTRY, SYSTEM.INI) more easily. The confusingprompts during system start--up, asking the operator whether changes of the sy-stem settings are to be saved and whether they are to be transferred to the backupalso, become unnecessary with the new handling. The system environment is ma-naged automatically, which guarantees the next system start--up to be successful.Modifications done to the system environment are automatically taken over withthis new management.

    The following procedure for managing the system environment has been realized:

    S There are (still) one working copy, one safety copy, one backup copy and tomake sure a separate SIEMENS original environment.

    S Normally exiting Windows in service mode or HMI mode turns the safetycopy to the backup copy and the working copy to the safety copy. Of course theworking copy still remains the working copy. This behavior guarantees changesof the system environment to be available for the next start--up and additionallysaves them.

    S During start--up it is checked whether the start--up can be run with the workingcopy. If this is true, the system is started using the working copy and the envi-ronment is available as it has been left when Windows has been exited. If not,the system is started using the safety copy as working copy. The most recentsystem settings will be lost, since they have violated the system integrity. If thestart--up should not be possible even with the safety copy, the backup copy be-comes the working copy and the system starts with this copy. In this case the

    most recently made changes will be lost, too.S Sheet anchor for a successful start--up is the SIEMENS original environment,

    2

  • 7/23/2019 Benutzer Eng

    32/527

    General information

    2.1 Features of the component PCUxx

    07.08

    2-32 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    which cannot be modified and in any case guarantees a successful start--up.This environment will then become the working copy, i.e. the original deliverystate is set again.

    S The corresponding files are located under C:\Tools\Siemens.org,

    C:\Tools\User.sav and C:\Tools\User.act and in the Widows directory(C:\win.95).

    Note

    These files will be overwritten when the software is updated.

    Shutting down the PCU50

    The functionality during the HMI shut--down has been modified. If now the HMI isleft with the EXIT button, the HMI applications are closed and Windows is shutdown. The system stops with the message Safe to power off. Press any key toreboot. In the process the automatic restart is stopped. It is distinguished, whetheran HMI start--up or a start--up in a Windows service mode has taken place. Duringan HMI start--up Windows is shut down as described above, a service--mode start--up shuts down the HMI only, Windows remains active.This improved functionality offers the EXIT softkey per default on HSK8 in the se-cond layer of the area menu during HMI shut--down. The following procedure runsduring the HMI shut--down:

    Following the instruction to shut down the HMI, (EXIT--button) the REGIE and theHMI applications (applications that have not been started with the OEM--Frame)run the protocol QueryForShutDown. Sequentially (the sequence corresponds tothe task index in the REGIE.INI) the QueryForShutDown--message is sent to theapplications. As soon as the first application responds negatively i.e. refuses theshut--down-- a recall alarm appears ...area xxx cannot be shut down. The RE-CALL--key is used for acknowledging the alarm and the corresponding area is im-plicitly selected. There the necessary operating actions may be taken. However theHMI shut--down is then interrupted and has to be started again later. If an applica-tion is active in the DOS box, the HMI shut--down is also stopped and the corres-ponding message prompts for first terminating the DOS box application. If all HMIapplications are ready for shut--down, the termination protocol is run one by one

    with each application. Applications that had been started from the OEM frame justreceive a WM_CLOSE message. If all applications have been processed like this,Windows is terminated while the HMI starts up.

  • 7/23/2019 Benutzer Eng

    33/527

    General information

    2.1 Features of the component PCUxx

    07.08

    2-33Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Note

    The softkey Exit may be locked in the file REGIE.INI with the entryExitButton=False.

    Locking key combinations

    Key combinations like Alt+Ctrl+Del, Alt+Tab, Alt+F4 are now hidden. If they shouldbe needed for OEM-- or service purposes, the entry SeqAct in the section[MMC103keyb] of the file SYSTEM.INI may be modified accordingly. This handlingonly works on a MMC103 hardware, since only here the Siemens--specific keybo-ard driver applies. In the service--mode the entry has no effect, i.e. all key com-binations are enabled.

    The following codes have been implemented:Bit 0: CTRL--ALT--DELBit 1: ALT--F4Bit 2: ALT--TABBit 3: LEFTSHIFT--ALT--TABBit 4: RIGHTSHIFT--ALT--TABBit 5: CTRL--ESCBit 6: ALT--ESCBit 7: ALT--SPACE

  • 7/23/2019 Benutzer Eng

    34/527

    General information

    2.2 Optimizing the development environment

    07.08

    2-34 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    2.2 Optimizing the development environment

    OverviewIn this section you can find some tricks and tips to make work easier for you.

    Limits using Visual Basic functions

    Here some Visual Basic functions are listed which you should not use in the envi-ronment of the HMI:

    MessageBox and InputBox (functions):

    The Regie itself decides which windows are displayed in the foreground. Thereforedialog boxes might be hidden even though they are waiting for entries and the HMI

    operation is blocked. As an alternative the function ModalDialog is offered.Several instances of one form:

    When running up the control, the Regie calls UNLOAD. Only if the implicit formvariable (same name as the form type) is being used, Visual Basic will --if neces-sary-- create a new instance.

    DoEvents:

    should be avoided, because it is not easy to go round recursive calls.

    2.3 Problems during operation and how to solve them

    Overview

    The following section describes problems that might possibly occur during opera-tion and shows how to solve them instead of calling the hotline.

    LoadLibrary -- first call

    If a DLL (here: REGIE.DLL) is called for the first time by LoadLibrary, the file RE-

    GIE.DLL must be located either in the actual directory or in the WINDOWS searchpath. In some developmental stages (e.g. while testing with a debugger) LoadLi-brarymight not find the file REGIE.DLL.

  • 7/23/2019 Benutzer Eng

    35/527

    General information

    2.3 Problems during operation and how to solve them

    07.08

    2-35Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Spelling of Child names

    Child names must always be spelt correctly and must be set in double quotes () ifused in an ASCII--file. A distinction is made between lower and upper case letters

    in Child names.

    Child names should not exceed 8 characters.

    Copy MDIChild

    Proceed as follows to generate a new MDI Child from a similar one which alreadyexists:

    S Store your project.

    S Modify the propertiesnameandtagof the existing MDI Child.

    S Store the modified Child withSave File as ...under a new name. Then the ori-ginal Child is no longer part of the project.

    S Add the original MDI Child to the project withAdd File.

    Lock--function in START--MDIFORM

    Using the function Set_State(START--MDIFORM) in the file PRIVATE.BAS underprivate_ini() leads to the following malfunction of the lock--function if it is called inthe FormLoad of the START--MDIFORM:

    The lock--function is canceled, since SetState() is called twice by the SequenceControl.

    Remedy:Move the lock--function of the START--MDIFORM to State_Reached.

    Error messages from the Sequence Control

    File AL_UTIL.DLL (or similar) not found

    If this error message occurs, the path in Project --> Properties --> Make --> Com-mand Line Arguments might not have been specified correctly.The correct entry must read C:\Siemens\Sinumerik\HMI--Advanced\mmc2.

    Alcommon.bas:State_init

    ..

    . Check FormNames

    If the FormNames match the specified files, you should remove the temporary fileof your application from the directory altmp.

    Quickly clicking softkeys

    Clicking softkeys several times might cause the system to crash.

  • 7/23/2019 Benutzer Eng

    36/527

    General information

    2.3 Problems during operation and how to solve them

    07.08

    2-36 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Description:

    Clicking softkeys several times causes the error message ALCOMMON.BASSet_Action, Error: Foreign application wont perform DDE--method or operation toappear. Then the error: The operator system has reached a critical point ------> re-

    boot the system appears.

    Reason:

    A DDE connection caused by a softkey action has not yet been terminated and thesame softkey action tries to build up a DDE connection again even though the firstone still exists.

    Remedy:

    Use AL_STOPSKS (lock softkey) before a DDE connection is established andAL_RESUMESKS (release softkey) after the DDE connection has been establis-hed.

    Display size on the testing PC

    Description:

    In the testing environment not all forms fit in the frame given by the VGA resolutionof the PCU xx. You can find two rows of softkeys: an outer and an inner row.

    Remedy:

    Add the following line to the section [CONTROL] of the .INI--file of your application:ScreenTwips=1

    Not enough contrast on the monochrome --display (black and white)

    Remedy:

    Under DOS you can increase the contrast with the key combination CTRL--ALT--Uor decrease the contrast with the key combination CTRL--ALT--D.

    Use the function ContrastUp or ContrastDown of the file REGIE.DLL to obtain thesame effect from the program.

    Problems with the Data Management when the power is cut off

    Problem description:

    When using either the COPY or the CREATE command specifying a source file ofthe Data Management Server with the parameter --f the following error might oc-cur:The existing file is deleted and the new file is not created/copied, since the para-meter --f causes the destination file to be overwritten in any case, even when theCOPY or CREATE action has been aborted with an error.

  • 7/23/2019 Benutzer Eng

    37/527

    General information

    2.3 Problems during operation and how to solve them

    07.08

    2-37Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Remedy:

    Instead of directly applying the COPY command to the actual destination file, copythe file from the HMI to a temporary file in the NC. If the COPY command was suc-cessful ( #100#... ), delete the already existing destination file on the NC and then

    rename the temporary file with the RENAME command.

    For the CREATE command proceed as follows: first create an empty file with theCREATE command and then follow the steps described for the COPY command.

    Problem with CREATE

    Problem description:

    If the CREATE command is used specifying a source file and if this file is quitelarge (1MB and more) the HMI gets blocked.

    Remedy:

    On the HMI only. Use the CREATE command without specifying a source file.Then use the VisualBasic command FILECOPY for overwriting the file createdwith CREATE.

    Access to network drives via Windows System functions

    If Windows system functions (e.g. the Win32 API function GetFileAttributes(path))are used to access files and directories stored on network drives, you must takeinto account that, if there is no network connection (e.g. network cable removed)the execution of these functions may take a longer time (e.g. 20 s) due to internal

    system timeouts. During this period, the calling thread cannot respond. If a func-tions is called in the main thread of the application, no softkeys are processed du-ring this time. Applications which are incorporated in the environment of HMI Ad-vanced via the sequence control or the Regie--COM server block the areaswitchover in addition.

    We therefore recommend that you separate the calls of such functions from theapplication itself resp. its main thread. This ensures the response capability of theapplication and the overall system. For example, the function can be called in aseparate thread. The calling application starts the thread which outputs the systemcall. Afterwards, it waits during a self--defined, short period for the result of thefunction. If the thread outputting the system call does not yield any result during

    this period, the system assumes an error upon system call and continues the appli-cation accordingly. The thread emitting the system call can wait for the system ti-meout independently of the application and then end itself autonomously withoutblocking the application. The application can respond again when the shorter ti-meout has ended.

  • 7/23/2019 Benutzer Eng

    38/527

    General information

    2.4 Transfer of VB applications from 16Bit to 32Bit

    07.08

    2-38 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    2.4 Transfer of VB applications from 16Bit to 32Bit

    If you have produced applications using VB 4-- 16Bit, proceed as follows in order totransfer the application for the 32Bit version of the HMI environment:

    Step1

    Replace DDECTL Controls by DCTL Controls in the 16Bit project using VB4--16Bit.

    Step2

    Install Visual Basic 6.0, Visual C++ 6.0 (Visual Studio 6.0 Enterprise Edition, Ser-vice Pack 2) on the development computer (WindowsNT 4.0 SP 6).

    Step 3

    Check if the Sheridan 3D Controls are completely and correctly installed (if theyare used the AB uses them):

    S Open Visual Basic 6.0 and create a new project (Standard EXE).

    S Select the component Sheridan 3D Controls in Project | Components.If this component does not exist, click Browse and select the filethreed32.ocx.The file is located either in the System32 folder or in the mmc2 folder.If it cannot be found in either folder, it must be copied from CD onto your hard

    disk.It can be found in:Visual Studio 6 in \Common\Tools\Vb\Controls on CD 3Visual Basic 6 in \Common\Tools\Vb\Controls on CD 1

    Place a Sheridan 3D Control (e.g. SSPanel) on a form; if this is possible theSheridan 3D Controls are already correctly installed.However, if you receive a message which reads that the placement is refuseddue to a missing license (Error 429 or License not found), the installation ofthe Sheridan 3D Controls must be corrected.In order to register for the design time, the file vbctrls.reg must be importedinto the registry. This can be done with the command regedit\vbctrls.reg.

    The reg file can be found in:Visual Studio 6 in \Common\Tools\Vb\Controls on CD 3Visual Basic 6 in \Common\Tools\Vb\Controls on CD 1

  • 7/23/2019 Benutzer Eng

    39/527

    General information

    2.4 Transfer of VB applications from 16Bit to 32Bit

    07.08

    2-39Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Step 4

    For the Samples 2 and 11, which are part of the delivery, the MicroHelp GaugeControl is required additionally.If you use these Samples please proceed according to what has been said for the

    Sheridan 3D Controls. The required file is called Gauge32.ocx.

    Step 5

    Transfer the language DLL (see Chapter Sequence Control Section Creating alanguage DLL).

    Step6

    Configure the 32Bit environment by:

    substituting drive L:e.g.Subst L: C:\Siemens\Sinumerik\HMI--Advanced

    Step 7

    Check the file VB.INI file, Section [VBX Conversions32] to contain the followingentries. If the entries are missing, they must be entered.

    [VBX Conversions32]

    threed.vbx={0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0;

    \threed32.ocx

    grid.vbx={A8B3B723-0B5A-101B-B22E-00AA0037B2FC}#1.0#0;\grid32.ocx

    mmcctrls.vbx={E55625E2-7147-11D1-897A-0020AFB6554E}#1.0#0;\mmcc

    tr32.dll

    dctl.vbx={22842323-3FCE-11D1-9B93-0020AF524FA5}#1.5#0;\dctl.ocx

    (VB automatically replaces the 16Bit DCTL and the 16Bit MMC Controls by therespective 32Bit Controls)

    Step 8

    Open the 16Bit project in VB6. This will:

    S replace the 16Bit versions of the DCTL Control and of the MMC Controls by therespective 32Bit versions, replace the GRID and the TREED Controls accordin-gly, and

    S automatically replace the Editor Control and the Disp Control by PictureBoxControls.

  • 7/23/2019 Benutzer Eng

    40/527

    General information

    2.4 Transfer of VB applications from 16Bit to 32Bit

    07.08

    2-40 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    Important

    The automatic replacement of the 16Bit DCTL and MMC Controls is only possibleif the font properties of these Controls are notused.

    Whether or not font properties are being used can be found out easily by openingthe 16Bit form file (*.frm) in a text editor and checking if the DCTL and MMCControls of the regarding form contain entries for the font properties such asFontbold,Fontitalicetc.Delete such entries from the form file in order to enable the automatic replacementof the 16Bit Controls by 32Bit ones to be carried out properly.

    Step 9

    Reference the type libraries SINHMI.TLB, Ole Automation and IRegieSvr in

    Project | References.

    Step 10

    Specify MMC path

    L:\MMC2

    in Project | Properties | Make in the dialog box Command Line Arguments.

    Step 11

    Functions of the AB166.DLL the names of which end on EX may be containedwithout this suffix in the AB32.DLL, i.e. alter existing functions in the applicationsaccordingly, if necessary.

    Step 12

    Transfer application--specific C--DLLs as either:

    S C--DLL (with/without type library) or

    S VB ActiveX DLL (Transfer from C to Basic --> Handling of strings is easier)

    Step 13

    In 16Bit the communication is performed through the Regie DLL and the RegieControl. These mechanisms will be carried out by the IRegieEvt and the IRegieSvrinterface of the RegierServer from Software version 6.0 on.

  • 7/23/2019 Benutzer Eng

    41/527

    General information

    2.4 Transfer of VB applications from 16Bit to 32Bit

    07.08

    2-41Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    VB application(32Bit)

    OEM application(32Bit)

    IRegieEvt IRegieEvt/OEMFrameIRegieSvrIRegieSvr

    VB application(16Bit)) OEM application(16Bit)

    RegieControl OEMFrameRegieDLL

    REG_CMD.EXE

    The following side conditions are valid for the 32Bit architecture:

    S 16Bit VB applications are supported

    S 16Bit Windows OEM applications are supported

    S DOS applications are not supported.

    In order to achieve compatibility of the existing 16Bit applications, the componentsREGIE.DLL and RECTLP32.VBX of the 32Bit stage of development must be used.If the 16Bit application is transferred to 32Bit, you must change to the RegieServer.

    For further details, see also Chapter Functions of the RegieServer.

    32Bit interfaces

    The following interfaces are supported:

    -- OEM interface 16Bit, consisting of REGIE.DLL and RECTLP32.VBX, nochanges in the scope of functions

    -- 32Bit Regie API interface (implemented in IRegieSvr interface), scope offunctions like REGIE.DLL

    -- 32Bit Regie Event interface (--> IRegieServerEvents interface), scope of

    functions like RECTLP32In the following text these interfaces are looked at in some more deatil:

  • 7/23/2019 Benutzer Eng

    42/527

    General information

    2.4 Transfer of VB applications from 16Bit to 32Bit

    07.08

    2-42 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    IRegieSvr interface

    Functions which were not contained in Regie.dll:

    AsyncCompleted: NEW

    GetCommandString: NEW

    InitSvr: NEW,MUST BE CARRIED OUT AS THE FIRSTFUNCTION!

    InitCompleteEx: NEW, SIMPLIFIED InitCompleteNB: InitComplete should no longer be used

    Functions which are no longer supported by IRegieSvr:

    ScreenOn: discontinued, use MMCScreenOnScreenOff: discontinued, use MMCScreenOffStopRegieEvents: discontinued, use TestAndStopRegieEvents

    ReadCmdLineVB: discontinued, use ReadCmdLineReadCmdLineMeVB: discontinued, use ReadCmdLineMeWriteCmdLineVB: discontinued, use WriteCmdLineWriteCmdLineExVB: discontinued, use WriteCmdLineEx

    All other functions of Regie.dll are supported by RegieServer, too.

    NB:

    The function InitSvr()mustbe carried out before any other function can be used.This function contains a Windows handle as one parameter. The Windows threadwhich produced this boxmustbe identical to the Windows thread which instancesthe IRegieSvr.

    See also:Chapter Functions of the RegieServer.

  • 7/23/2019 Benutzer Eng

    43/527

    General information

    2.4 Transfer of VB applications from 16Bit to 32Bit

    07.08

    2-43Siemens AG 2008 All Rights ReservedHMI Programming Package Part 1 (BN) -- 08.2008 Edition

    IRegieServerEvents interface

    RECTLP32 knew the following properties:

    AsyncCompleted: to acknowledge an event

    DoCommandParam: to export a command stringThese two properties are realized in IregieEvt with the help of two functions:

    AsyncCompleted(): synonymous to the AsyncCompleted property of theRECTLP32

    GetCommandString synonymous to the DoCommandParam property ofthe RECTLP32

    In addition, RECTLP32.VBX supported the following events:

    FORMLOADACTIVATEFORMUNLOAD

    DEACTIVATEQUERYFORSHUTDOWNGETSPECIALKEY

    These events are fired into the Notify method of the ConnectionPoint (IRegieSer-verEvents interface) which is to be implemented on the client side.

    The following events are currently supported:

    FORMLOADACTIVATEFORMUNLOADDEACTIVATE

    QUERYFORSHUTDOWNGETSPECIALKEY

    See also:Chapter Functions of the RegieServer

  • 7/23/2019 Benutzer Eng

    44/527

    General information

    2.5 Notes for the OEM user on Hard disk Backup/Restore with Ghost

    07.08

    2-44 Siemens AG 2008 All Rights Reserved

    HMI Programming Package Part 1 (BN) -- 08.2008 Edition

    2.5 Notes for the OEM user on Hard disk Backup/Restore

    with Ghost

    Saving the contents of the hard disk with GHOST is described in detail in the HMIAdvanced Startup Manual.

    The import of an image is described there as well.

    During the import the following dialog pops up:

    What kind of partitioning is the selected im