版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、TM671Creating efficient mapp View HMIapplicationsPrerequisites and requirementsTM671 - Creating efficient mapp View HMI applications2Training modulesTM611 Working with mapp viewSoftwareThe prerequisite for the execution of this training module is the mapp View project created in TM611.Automation Stu
2、dio 4.3.3Automation Runtime 4.33Technology Package mapp View 5.0HardwareARsimX20 CPU with611.1T10-1Table of contentsTable of contents1 Introduction41.1 Learning objectives41.2 Symbols and safety notices42 Dialog and message boxes52.1 Overview of dialog and message boxes52.2 Creating and opening a di
3、alog box52.3 MessageBox overview112.4 Open message box and evaluate confirmation123 Using roles and rights on widgets173.1 Overview of roles and rights on widgets173.2 Role-based visibility and usability of widgets174 Animations in the HMI application214.1 Simple visibility control for widgets214.2
4、Visibility control calculated using multiple process values234.3 Background image for a page274.4 Changing the color of widgets304.5 Relative and absolute positioning in Container widgets334.6 Scaling the HMI application to the size of the browser window355 Tasks with different variable types365.1 E
5、xchange information with different widgets375.2 Changing users and switching the page425.3 Using system variables446 Exercises with the text system466.1 Displaying indexed texts467 Content engineering in XML517.1 Adding widgets517.2 Adding Container widgets528 Multi-client Multi-user538.1 Client-spe
6、cific OPC UA binding569 Summary60TM671 - Creating efficient mapp View HMI applications3Introduction1 Introductionmapp View includes a wide range of combinable and easy-to-configure standard components. The ex- ercises in this training module are designed to deepen your existing basic knowledge of ma
7、pp View. The additional information, configuration options and combination of various widgets open up entirely new possibilities for designing an HMI application.1.1 Learning objectivesThis training module uses exercises to expand and reinforce your existing basic knowledge of mapp View.Participants
8、 will learn how to use the event and action system with different use cases. Participants will be able to apply the Automation Studio roles and rights system on widgets for visibility and operation.Participants will learn about procedures and options for the animation of widgets.Participants will be
9、 able to implement the different types of variables in the mapp View HMI ap- plication for the correct tasks.Participants will complete additional exercises related to using the text system. Participants will get an overview of content engineering in XML files.Participants will be able to create HMI
10、 applications for the appropriate task on different end de- vices.Participants will get an overview of the implementation of several HMI applications.1.2 Symbols and safety noticesUnless otherwise specified, the descriptions of symbols and safety notices listed in "TM210 Working with Automation
11、 Studio" apply.TM671 - Creating efficient mapp View HMI applications4Dialog and message boxes2 Dialog and message boxesA dialog box and a message box are elements of an HMI application that can be displayed over a page.2.1 Overview of dialog and message boxesA dialog box is a window created by
12、the developer of the HMI application that, similar to a page, is designed using a layout and the content referenced in its areas.All widgets can be placed and configured in a piece of content that is used in the dialog box.Figure 1: Example of a dialog boxAreas of application of dialog boxesDialog b
13、oxes are displayed to collect input from the user. Modal dialog boxes lock the rest of the userinterface while the dialog box is being displayed. M outside of the dialog box.ess dialog boxes continue to allow interactions2.2 Creating and opening a dialog boxThe goal of this exercise is to create a d
14、ialog box for user authentication in the HMI application. For the dialog box, a layout with an area is used which is assigned a piece of content with the size of the layout.Exercise: Creating a dialog boxUsing the following description, a dialog box should be created in which a login widget and a bu
15、tton widget for closing the dialog box are shown. The dialog box is opened by clicking on the image in the header.Figure 2: Open the dialog box by clicking on the imageThe following steps are necessary for this:1)2)3)4)5)6)Create a layout Create content Create a dialog boxReference dialog boxes in t
16、he visualization object Event binding for opening the dialog boxEvent binding for closing the dialog boxTM671 - Creating efficient mapp View HMI applications5Dialog and message boxes2.2.1 Creating a layoutThe layout is added to the Logical View. The layout with the ID "DialogLayout" is con
17、figured with width="450" and height="300" in the open XML editor.Table 1: Properties of the layout fileAn area the same size as the layout is configured.IdHeightwidthlefttopAreaDialog30045000Table 2: Properties of an areaFigure 3: Add the layout file in Logical View and edit the
18、XML fileTM671 - Creating efficient mapp View HMI applications6Property nameValueidDialogLayoutHeight300width450HMI application / mapp View / Engineering / Dialog boxesDialog and message boxesFinal result2.2.2 Creating contentA piece of content is added in the package "Dialog boxes / AreaCo- nen
19、ts". After adding the content file in the Logical View, the name must be changed to "ContentLogin".Figure 4: Content file addedEditing contentA piece of content is edited in the visual editor. In the Properties window, a unique name as well as the width and height of the content are e
20、ntered.Figure 5: ContentLogin propertiesTM671 - Creating efficient mapp View HMI applications7<?xml version="1.0" encoding="utf-8"?><ldef:Layout id="DialogLayout" height="300" width="450"xmlns:ldef=""><Areas><Area id=&q
21、uot;AreaDialog" height="300" width="450" left="0" top="0" /></Areas></ldef:Layout>Dialog and message boxesA login widget and a button widget have to be placed in the content. The dialog box should be closed by selecting the button labeled &
22、quot;ButtonClose".Figure 6: Widgets configured in the content2.2.3 Creating a dialog boxA dialog box is added from the Object Catalog to the "Dialog" object in an existing "Dialogs" package using drag-and-drop or by double-clicking on it. The "Dialogs" package is p
23、art of a mapp View visualization package.The next step is to create a dialog box with the name "LoginDi- alog" where a layout and a piece of content can then be refer- enced.Figure 7: Inserted dialog boxIn order to uniquely identify the dialog box, a unique "ID" must be specified
24、. To use the previously defined layout, the "ID" of the layout "DialogLayout" must be specified.The following areas and pieces of content are used to design the "LoginDialog":typebaseContentRefIdareaRefIdContentTable 3: Properties for the dialog boxContentLoginAreaDialo
25、gTM671 - Creating efficient mapp View HMI applications8The following steps cannot be differentiated from the configuration of a page. Dialog boxes are managed in the "Dialogs" package.Dialog and message boxesThe following XML code has to be entered in the "LoginDialog.dialog" fil
26、e:2.2.4 Referencing a dialog box in the HMI application (.vis)The dialog box must be referenced in the HMI application (.vis) of the Configuration View so that it is also transfered as a part of the HMI application.The dialog boxes that are part of the HMI application are defined in the element <
27、Dialogs>.The image shows the relevant content for practicing with this visualization object (.vis).2.2.5 Event binding for opening the dialog boxA new <EventBinding> is created in the available event binding file. As a source, the click event of the "Image" widget placed in the Co
28、ntentTop is used for displaying a user.The finished entry in the example for clicking on an "Image" widget looks as follows:After the event has been defined, the subsequent action must be defined. The possible attributes are described in Automation Help.The concrete action for opening a di
29、alog box looks as follows:/>The entire event binding for opening a dialog box looks as follows:TM671 - Creating efficient mapp View HMI applications9<Target xsi:type="clientSystem.Action"><Method xsi:type="clientSystem.Action.OpenDialog" dialogId="LoginDialog&quo
30、t;</Target><Source xsi:type="widgets.brease.Image.Event" contentRefId="ContentTop" widgetRefId="Image1" event="Click" />If the widgetRefId of the "Image" widget placed in the content is unknown, it has to be checked by opening the corresp
31、onding piece of content.<Dialogs><Dialog refId="LoginDialog"/></Dialogs><?xml version="1.0" encoding="utf-8"?><ddef:Dialog id="LoginDialog" layoutRefId="DialogLayout"xmlns:ddef=""><Assignments><Assignm
32、ent type="Content" baseContentRefId="ContentLogin" areaRefId="AreaDialog" /></Assignments></ddef:Dialog>Dialog and message boxesExpected resultFigure 8: HMI application in the browser with an opened dialog box after clicking on the user image2.2.6 Event b
33、inding for closing the dialog boxA new <EventBinding> is created in the available event binding file.As a source, the click event of the Button widget placed in the ContentLogin with the name "ButtonClose" is used to close the dialog box. The finished entry in the example for clickin
34、g on a "Button" widget looks as follows:After the event has been defined, the subsequent action must be defined. The parameters that can be selected are defined in Automation Help.TM671 - Creating efficient mapp View HMI applications10<Source xsi:type="widgets.brease.Button.Event&q
35、uot; contentRefId="ContentLogin" widgetRefId="ButtonClose" event="Click" /><EventBinding><Source xsi:type="widgets.brease.Image.Event" contentRefId="ContentTop" widgetRefId="Image1" event="Click"/><EventHandler&g
36、t;<Action><Target xsi:type="clientSystem.Action"><Method xsi:type="clientSystem.Action.OpenDialog" dialogId="LoginDialog" /></Target></Action></EventHandler></EventBinding>Dialog and message boxesThe action for closing the dialo
37、g box looks as follows:"/>The entire event binding for closing a dialog box looks as follows:2.3 MessageBox overviewA message box is shown via a page. The user must confirm the message box, which may execute an additional action depending on what is selected.Figure 9: MessageBox exampleA mes
38、sage box consists of a content area, header and button area.The content area displays the message text that has to be shown and, optionally, an image. A text can be displayed in the headerThe button area can contain one or more buttons corresponding to the message box type.Figure 10: Areas of a mess
39、age boxTM671 - Creating efficient mapp View HMI applications11<EventBinding><Source xsi:type="widgets.brease.Button.Event" contentRefId="ContentLogin" widgetRefId="ButtonClose" event="Click"/><EventHandler><Action><Target xsi:type=&q
40、uot;clientSystem.Action"><Method xsi:type="clientSystem.Action.CloseDialog" dialogId="LoginDialog"/></Target></Action></EventHandler></EventBinding><Target xsi:type="clientSystem.Action"><Method xsi:type="clientSystem.
41、Action.CloseDialog" dialogId="LoginDialog</Target>HMI application / mapp View / Engineering / Events and actions / Action / Client system actions / CloseDialogDialog and message boxes2.3.1 Message box typesWhen calling a message box, stating the type specifies which buttons are shown
42、. The type is selected according to the confirmation that is expected as a result of the event.Table 4: Message box types2.3.2 Message box return valueIf a message box of a certain type is shown, then confirmation is ex- pected from the HMI application operator. Depending on the button pressed, the
43、result can be evaluated in the event binding and the desired action can be configured.Here, every button is assigned an ID that allows it to be evaluated in a condition.Table 5: Message box button ID2.3.3 Areas of applicationMessage boxes are displayed to collect input from the user. A message box r
44、equires confirmation, which influences the process sequence according to the selection made by the user. Unlike a dialog box, the structure of a message box cannot be changed by the user. A message box is a system component.2.4 Open message box and evaluate confirmationThe goal of this exercise is t
45、o configure an "OKCancel" message box which is opened on a certain event. An OPC UA variable with a defined value is described by pressing the "OK" button.The message box is configured via the event binding.Exercise: Configure an "OKCancel" message boxThe following desc
46、ription explains how to configure a message box in which the OPC UA variable "Set- Temperature" is set to a defined value by pressing the "OK" button. The message box is closed without any additional action by selecting the "Cancel" button.The following steps are necess
47、ary:TM671 - Creating efficient mapp View HMI applications12Button IDValueYes1No2OK4Cancel8Abort16Retry32Ignore64Message box typeDescriptionAbortRetryIgnoreDisplays buttons for "Abort", "Repeat" and "Ignore"OKDisplays an "OK" buttonOKCancelDisplays buttons for
48、"OK" and "Abort"RetryCancelDisplays buttons for "Repeat" and "Abort"YesNoDisplays buttons for "Yes" and "No"YesNoCancelDisplays buttons for "Yes", "No" and "Abort"Dialog and message boxes1)2)3)4)Use the button
49、on the ContentMainPage to open the message box Create an event bindingCall message boxConfigure result of pressing the "OK" button using an OPC UA action2.4.1 Button widget for opening the message boxThe "Button" widget placed in the ContentMainPage is used to open the message bo
50、x. The name of the button has to be changed to "ButtonMsgBox" in this case. In addition, text for labeling the button has to be defined.Figure 11: Button for opening a message box2.4.2 Creating an event bindingA new <EventBinding> is created in the available event binding file.As a s
51、ource, the click event of the Button widget placed in the ContentMainPage with the name "Button- MsgBox" is used for opening the message box.The finished entry for clicking on a "Button" widget looks as follows:After the event has been defined, the subsequent action must be defin
52、ed. The parameters that can be selected are defined in Automation Help.TM671 - Creating efficient mapp View HMI applications13<Source xsi:type="widgets.brease.Button.Event" contentRefId="ContentMainPage" widgetRefId="ButtonMsgBox" event="Click" />HMI app
53、lication / mapp View / Engineering / Events and actions / Client system actions / ShowMessageBoxDialog and message boxesThe action for opening a message box of the type "OkCancel" looks as follows:The next step is to configure the action for the expected result of a pressed button. The OPC
54、 UA variable ":AsGobalPV:SetTemperature" is set to a value = "30".For this, a <Result> element with a <ResultHandler> that is available for every button must be configured using the respective <Action>. In the <ResultHandler>, the "OK" button wit
55、h the button-Id=4 is reacted to as a return value in the condition.The entire event binding for opening a message box looks as follows:TM671 - Creating efficient mapp View HMI applications14<Result><ResultHandler condition="result = 4"><Action><Target xsi:type="op
56、cUa.NodeAction" refId=":AsGlobalPV:SetTemperature" ><Method xsi:type="opcUa.NodeAction.SetValueNumber" value="30" /></Target></Action></ResultHandler></Result>The message text (message=) and the text header (header=) can be referenc
57、ed by specifying a localized text ID from the text system (e.g. $IAT/MessageText).<Target xsi:type="clientSystem.Action"><Method xsi:type="clientSystem.Action.ShowMessageBox" type="OKCancel"message="Are you sure?" header="Reset SetTemperature&quo
58、t; icon="Warning" /></Target>HMI application / mapp View / Engineering / Events and actions / Client system actions / ShowMessageBoxDialog and message boxesr"Expected resultWhen the button "MsgBox" is pressed, a dialog box is opened.TM671 - Creating efficient mapp V
59、iew HMI applications15<EventBinding><Source xsi:type="widgets.brease.Button.Event" contentRefId="ContentMainPage" widgetRefId="ButtonMsgBox" event="Click"/><EventHandler><Action><Target xsi:type="clientSystem.Action"><
60、;Method xsi:type="clientSystem.Action.ShowMessageBox" type="OKCancel"message="Are you sure?" header="Reset SetTemperature" icon="Warning"/></Target><Result><ResultHandler condition="result = 4"><Action><Target
61、xsi:type="opcUa.NodeAction" refId=":AsGlobalPV:SetTemperature" ><Method xsi:type="opcUa.NodeAction.SetValueNumbe value="30" /></Target></Action></ResultHandler></Result></Action></EventHandler></EventBinding>Dialog
62、 and message boxesFigure 12: The message box is displayed in the foregroundWhat's expected when pressing the OK button is that the value of the OPC UA variable "SetTemperature" is set to the value "30".A corresponding error entry "BadUserAccessDenied" is entered in the Automation Runtime logger.Figure 13: AR logger when write access is deniedTM671 - Creating efficient mapp View HMI applications16Since login is carried out with the "Anonymous"
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年安徽国际商务职业学院马克思主义基本原理概论期末考试模拟题附答案解析
- 2025年大连医科大学马克思主义基本原理概论期末考试模拟题含答案解析(必刷)
- 2025年滨州职业学院马克思主义基本原理概论期末考试模拟题含答案解析(必刷)
- 2025年广东科技学院马克思主义基本原理概论期末考试模拟题带答案解析
- 2025年安徽师范大学皖江学院马克思主义基本原理概论期末考试模拟题含答案解析(必刷)
- 2025年12月份贵州遵义市习水县招聘城镇公益性岗位人员40人参考考试试题及答案解析
- 绵阳职业技术学院2025年下半年公开考核招聘高层次人才(53人)备考笔试试题及答案解析
- 2025甘肃天水市秦州区眼科医院招聘超声影像工作人员1人参考考试试题及答案解析
- 常见抗肿瘤药物的不良反应及处理课件
- 2025河南驻马店市直公益性岗位招聘16人模拟笔试试题及答案解析
- 机器人精准穴位刺激-洞察与解读
- 2025年教师职称考试(美术)(小学)自测试题及答案
- 基于机器学习的蒸发波导预测研究
- 壁挂炉基础知识培训课件
- 小型施工机械安全培训课件
- PCBA维修培训课件
- 《解厄学》原文及译文
- 舞蹈理论知识考核试题题库附答案
- 西游记的法宝及兵器
- 藏文主持词模板
- 2025年消毒员岗位理论知识考试试题及答案
评论
0/150
提交评论