<< 点击显示目录 >> 主页 mappVision帮助助手 > 机器视觉帮助 > mapp Vision > 编程 > 库 > 核心库 > ViBase > 用例 > 产品转换用例 > 创建人机界面应用程序 |
信息:
此处列出的步骤和说明在自动化帮助中的 mapp View 部分有更详细的描述。
在学习了 mapp View 帮助文档中的 "入门 "部分后,任何不清楚的地方都可以迎刃而解。
之后
1.在软件包 "mapp View "中添加了人机界面应用程序,并配置为 id="ProductChangeoverUseCase" autoUpdate="true "1)、
2.逻辑视图中已添加软件包 "mapp View"、
3.在包 "mapp View "中添加了包 "Visualization"、
✓为创建页面元素创建了条件。
首先,创建一个布局,名称为 mainLayout,文件名为 mainLayout.layout,尺寸为 800 x 800 像素。其中包含一个名为 mainArea 的填充区域。
图配置视图 |
图:逻辑视图 |
然后创建一个文件名为 pPCUC.page 的页面。在属性窗口中,pageId 设置为 pPCUC,layoutId 设置为 mainLayout。
现在创建一个文件名为 cPCUC.content 的内容文件。在属性窗口中,文件名设置为 cPCUC,高度和宽度设置为 700 x 700 像素。
信息:
现在必须在该内容文件中填充所需的 mapp View 部件。使用 mapp 视图内容编辑器很容易实现这一点。
详细描述将超出 mapp Vision 帮助文档本节的范围。下面记录的是两个变体的 cPCUC.content 文件的 XML 内容:
<?xml version="1.0" encoding="utf-8"?
<Content id="cPCUC" height="700" width="700" xmlns="http://www.br-automation.com/iat2015/contentDefinition/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:types="http://www.br-automation.com/iat2015/widgetTypes/v2">
<Widgets> <Widgets
<Widget xsi:type="widgets.brease.GroupBox" id="GroupLoadVa" top="15" left="15" width="660" height="560" zIndex="0">
<Widgets> <Widgets
<Widget xsi:type="widgets.brease.PushButton" id="RefreshList" top="55" left="15" width="120" zIndex="1" breakWord="true" multiLine="true" text="Refresh List" wordWrap="true" /> <Widget xsi:type="widgets.brease.
<Widget xsi:type="widgets.brease.PushButton" id="LoadSelectedApplication" top="495" left="15" width="160" zIndex="2" text="Load Application" />
<Widget xsi:type="widgets.brease.TextOutput" id="SelectedVAName" top="500" left="180" width="480" height="20" zIndex="3" value="<Selected VA Name>" bold="true" />
<Widget xsi:type="widgets.brease.PushButton" id="ClearData" top="55" left="540" zIndex="4" breakWord="true" multiLine="true" text="Clear Data" wordWrap="true" /> <Widget xsi:type="widgets.brease.
<Widget xsi:type="widgets.brease.Table" id="VAListTableDemo" top="104" left="15" width="625" height="302" zIndex="5" columnWidth="220" showHeader="false" borderStyle="solid" borderWidth="1px" cellBorderWidth="1px 1px 1px 1px" bold="true">
<Widgets> <Widgets
<Widget xsi:type="widgets.brease.TableItem" id="VAStringList" zIndex="6" columnWidth="623" headerTextColor="rgba(51, 51, 51, 1)" bold="true" cellBorderWidth="0px 0px 0px 0px" /> <Widget> <Widget> xsi:type="widgets.brease.
</Widgets> </Widgets
</Widget> </Widget
<Widget xsi:type="widgets.brease.Label" id="NumberOfVasText" top="445" left="15" width="365" height="15" zIndex="7" multiLine="true" text="PLC上可加载的可视化应用程序总数" wordWrap="true" textAlign="left" padding="0px 0px 0px 0px" />
<Widget xsi:type="widgets.brease.NumericOutput" id="CompatibleVANumber" top="438" left="424" width="80" zIndex="8" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':5},'imperial':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3},'imperial-us':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3}}" maxValue="65535" value="12345" borderStyle="none" textAlign="left" fontSize="14px" bold="false" /> <Widget xsi:type="type" target="_blank">more
<Widget xsi:type="widgets.brease.Label" id="ListIncomplete" top="443" left="400" width="240" height="20" zIndex="9" multiLine="true" text="Not all are listed !" wordWrap="true" textColor="rgba(255, 128, 0, 1)" textAlign="right" bold="true" padding="0px 0px 0px 0px" /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <strong>3D 模式
</Widgets> </Widgets
</Widget> </Widget
<Widget xsi:type="widgets.brease.TextOutput" id="StateMachineTitle" top="25" left="15" width="660" height="40" zIndex="10" multiLine="true" textColor="rgba(128, 128, 128, 1)" textAlign="left top" 楷体="true" /> </Widget> <商业登记/"状态机标题 "文本输出
</Widgets> </Widgets
</内容
带有 Widget 表格的变量 A
<?xml version="1.0" encoding="utf-8"?
<Content id="cPCUC" height="700" width="700" xmlns="http://www.br-automation.com/iat2015/contentDefinition/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Widget
<Widget xsi:type="widgets.brease.GroupBox" id="GroupLoadVa" top="15" left="15" width="660" height="560" zIndex="0">
<Widgets> <Widgets
<Widget xsi:type="widgets.brease.PushButton" id="RefreshList" top="55" left="15" width="120" zIndex="1" breakWord="true" multiLine="true" text="Refresh List" wordWrap="true" /> <Widget xsi:type="widgets.brease.
<Widget xsi:type="widgets.brease.PushButton" id="LoadSelectedApplication" top="495" left="15" width="160" zIndex="2" text="Load Application" />
<Widget xsi:type="widgets.brease.TextOutput" id="SelectedVAName" top="500" left="180" width="480" height="20" zIndex="3" value="<Selected VA Name>" />
<Widget xsi:type="widgets.brease.PushButton" id="ClearData" top="55" left="540" zIndex="4" breakWord="true" multiLine="true" text="Clear Data" wordWrap="true" /> <Widget xsi:type="widgets.brease.
<Widget xsi:type="widgets.brease.DropDownBox" id="VAListItemCollectionDemo" top="55" left="165" width="345" zIndex="5" listPosition="bottom" listWidth="480" /> </p
<Widget xsi:type="widgets.brease.Label" id="NumberOfVasText" top="445" left="15" width="320" height="15" zIndex="6" multiLine="true" text="PLC上可加载的虚拟机数量" wordWrap="true" textAlign="left" padding="0px 0px 0px 0px" />
<Widget xsi:type="widgets.brease.NumericOutput" id="CompatibleVANumber" top="438" left="340" width="60" zIndex="7" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3},'imperial':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3},'imperial-us':{'十进制空格':0,'最小整数位数':1,'最大整数位数':3}}" textAlign="left" />
<Widget xsi:type="widgets.brease.Label" id="ListIncomplete" top="443" left="400" width="240" height="20" zIndex="8" multiLine="true" text="Not all loadable VAs are listed !" wordWrap="true" textColor="rgba(255, 128, 0, 1)" textAlign="right" padding="0px 0px 0px 0px" /> </Widgets> <商业登记/"...
</Widgets> </Widgets
</Widget> </Widget
<Widget xsi:type="widgets.brease.TextOutput" id="StateMachineTitle" top="25" left="15" width="660" height="40" zIndex="9" multiLine="true" textAlign="left top" />
</Widgets> </Widgets
</内容
1) PCUC
Information:
The steps and instructions listed here are described in more detail in the mapp View section in Automation Help.
Any ambiguities can be resolved after studying section "Getting started" in the mapp View help documentation.
After
1.A HMI application has been added in package "mapp View" and configured with id="ProductChangeoverUseCase" autoUpdate="true"1),
2.Package "mapp View" has been added in the Logical View,
3.Package "Visualization" has been added in package "mapp View",
✓the conditions are created to create the elements of the page.
First, a layout is created with name mainLayout, filename mainLayout.layout and dimensions 800 x 800 pixels. This contains a single filling area named mainArea.
Fig.: Configuration View |
Fig.: Logical View |
A page with filename pPCUC.page is then created. In the properties window, pageId is set to pPCUC and layoutId is set to mainLayout.
A piece of content file with filename cPCUC.content is now created. In the properties window, the name is set to cPCUC, and the height and width are set to 700 x 700 pixels.
Information:
The piece of content file must now be populated with the required mapp View widgets. This is easy to implement with the mapp View Content Editor.
A detailed description would go beyond the scope of this section of the mapp Vision help documentation, however. Instead, the resulting XML contents of file cPCUC.content are recorded for the two variants:
<?xml version="1.0" encoding="utf-8"?>
<Content id="cPCUC" height="700" width="700" xmlns="http://www.br-automation.com/iat2015/contentDefinition/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:types="http://www.br-automation.com/iat2015/widgetTypes/v2">
<Widgets>
<Widget xsi:type="widgets.brease.GroupBox" id="GroupLoadVa" top="15" left="15" width="660" height="560" zIndex="0">
<Widgets>
<Widget xsi:type="widgets.brease.PushButton" id="RefreshList" top="55" left="15" width="120" zIndex="1" breakWord="true" multiLine="true" text="Refresh List" wordWrap="true" />
<Widget xsi:type="widgets.brease.PushButton" id="LoadSelectedApplication" top="495" left="15" width="160" zIndex="2" text="Load Application" />
<Widget xsi:type="widgets.brease.TextOutput" id="SelectedVAName" top="500" left="180" width="480" height="20" zIndex="3" value="<Selected VA Name>" bold="true" />
<Widget xsi:type="widgets.brease.PushButton" id="ClearData" top="55" left="540" zIndex="4" breakWord="true" multiLine="true" text="Clear Data" wordWrap="true" />
<Widget xsi:type="widgets.brease.Table" id="VAListTableDemo" top="104" left="15" width="625" height="302" zIndex="5" columnWidth="220" showHeader="false" borderStyle="solid" borderWidth="1px" cellBorderWidth="1px 1px 1px 1px" bold="true">
<Widgets>
<Widget xsi:type="widgets.brease.TableItem" id="VAStringList" zIndex="6" columnWidth="623" headerTextColor="rgba(51, 51, 51, 1)" bold="true" cellBorderWidth="0px 0px 0px 0px" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.Label" id="NumberOfVasText" top="445" left="15" width="365" height="15" zIndex="7" multiLine="true" text="Total number of loadable Vision Applications on PLC" wordWrap="true" textAlign="left" padding="0px 0px 0px 0px" />
<Widget xsi:type="widgets.brease.NumericOutput" id="CompatibleVANumber" top="438" left="424" width="80" zIndex="8" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':5},'imperial':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3},'imperial-us':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3}}" maxValue="65535" value="12345" borderStyle="none" textAlign="left" fontSize="14px" bold="false" />
<Widget xsi:type="widgets.brease.Label" id="ListIncomplete" top="443" left="400" width="240" height="20" zIndex="9" multiLine="true" text="Not all are listed !" wordWrap="true" textColor="rgba(255, 128, 0, 1)" textAlign="right" bold="true" padding="0px 0px 0px 0px" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.TextOutput" id="StateMachineTitle" top="25" left="15" width="660" height="40" zIndex="10" multiLine="true" textColor="rgba(128, 128, 128, 1)" textAlign="left top" italic="true" />
</Widgets>
</Content>
Variant A with widget Table
<?xml version="1.0" encoding="utf-8"?>
<Content id="cPCUC" height="700" width="700" xmlns="http://www.br-automation.com/iat2015/contentDefinition/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Widgets>
<Widget xsi:type="widgets.brease.GroupBox" id="GroupLoadVa" top="15" left="15" width="660" height="560" zIndex="0">
<Widgets>
<Widget xsi:type="widgets.brease.PushButton" id="RefreshList" top="55" left="15" width="120" zIndex="1" breakWord="true" multiLine="true" text="Refresh List" wordWrap="true" />
<Widget xsi:type="widgets.brease.PushButton" id="LoadSelectedApplication" top="495" left="15" width="160" zIndex="2" text="Load Application" />
<Widget xsi:type="widgets.brease.TextOutput" id="SelectedVAName" top="500" left="180" width="480" height="20" zIndex="3" value="<Selected VA Name>" />
<Widget xsi:type="widgets.brease.PushButton" id="ClearData" top="55" left="540" zIndex="4" breakWord="true" multiLine="true" text="Clear Data" wordWrap="true" />
<Widget xsi:type="widgets.brease.DropDownBox" id="VAListItemCollectionDemo" top="55" left="165" width="345" zIndex="5" listPosition="bottom" listWidth="480" />
<Widget xsi:type="widgets.brease.Label" id="NumberOfVasText" top="445" left="15" width="320" height="15" zIndex="6" multiLine="true" text="Number of loadable VAs on PLC" wordWrap="true" textAlign="left" padding="0px 0px 0px 0px" />
<Widget xsi:type="widgets.brease.NumericOutput" id="CompatibleVANumber" top="438" left="340" width="60" zIndex="7" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3},'imperial':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3},'imperial-us':{'decimalPlaces':0,'minimumIntegerDigits':1,'maximumIntegerDigits':3}}" textAlign="left" />
<Widget xsi:type="widgets.brease.Label" id="ListIncomplete" top="443" left="400" width="240" height="20" zIndex="8" multiLine="true" text="Not all loadable VAs are listed !" wordWrap="true" textColor="rgba(255, 128, 0, 1)" textAlign="right" padding="0px 0px 0px 0px" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.TextOutput" id="StateMachineTitle" top="25" left="15" width="660" height="40" zIndex="9" multiLine="true" textAlign="left top" />
</Widgets>
</Content>
1) PCUC