| 
       << 点击显示目录 >> 主页 mappView帮助助手 > mapp View帮助信息 > 工程 > 变量和数据 > Binding > 可能的数据来源 | 
    
本节描述了哪些数据源可以在mapp View中作为源和/或目标使用。
为了使过程变量可用于绑定,它们必须首先被启用为OPC UA变量。
见 OPC UA变量。
在一个绑定中使用OPC UA变量。
Attribute  | 
值  | 
xsi:type  | 
opcUa  | 
refId  | 
对一个OPC UA变量的引用。 参见 对一个OPC UA变量的寻址。  | 
attribute  | 
node value  | 
serverAlias (optional)  | 
|
samplingRate (optional)  | 
|
nameSpaceAlias (optional)  | 
例子
OPC UA变量必须完全作为源使用。这意味着OPCUa类型的目标是不允许的!
<Source xsi:type="opcUa" refId="::AsGlobalPV:gMainLogic.par.coffeeType" attribute="value" />
小组件有各种可用于绑定的属性。
请看 小组件的文档。
在一个绑定中使用部件:
Attribute  | 
Value  | 
xsi:type  | 
brease  | 
widgetRefId  | 
widget实例的ID  | 
contentRefId  | 
配置widget的内容片段的ID  | 
attribute  | 
widget的所有可绑定的属性。 请参阅 小组件的文档。  | 
Example
<Target xsi:type="brease" contentRefId="myContent" widgetRefId="ImageSwitchCoffeeType" attribute="selectedIndex" />
位于不同内容片断中的小工具可以使用会话变量进行绑定。请看用例 用一个会话变量连接两个内容。
直接绑定不同内容片断中的部件是不允许的!
参见 会话变量。
在绑定中使用一个会话变量。
Attribute  | 
值  | 
xsi:type  | 
session  | 
refId  | 
会话变量的ID  | 
attribute  | 
value  | 
例子
<Source xsi:type="session" refId="clientIndex" attribute="value" />
参见 系统变量。
在绑定中使用一个系统变量。
Attribute  | 
Value  | 
xsi:type  | 
session  | 
refId  | 
系统变量的ID,前缀为::SYSTEM。 关于寻址的其他信息,见 系统变量  | 
attribute  | 
value  | 
例子
<Source xsi:type="session" refId="::SYSTEM:clientIndex" attribute="value" />
参见 配置mapp View服务器。
在绑定中使用服务器变量。
Attribute  | 
值  | 
xsi:type  | 
server  | 
refId  | 
服务器变量的ID  | 
attribute  | 
value  | 
例子
<Source xsi:type="server" refId="::SYSTEM:server.maxClients" attribute="value" />
请参阅 "片段Snippets。
在绑定中使用一个片段。
Attribute  | 
值  | 
xsi:type  | 
snippet  | 
refId  | 
ID of the snippet  | 
attribute  | 
value  | 
例子
<Source xsi:type="snippet" refId="mySnippet" attribute="value" />
值可以作为输入(操作数operands)或输出(结果)被绑定到表达式上。
参见 表达式。
在绑定中使用一个表达式。
Attribute  | 
值  | 
xsi:type  | 
expression  | 
refId  | 
ID of the expression  | 
attribute  | 
result Name of an operand  | 
例子
    <Source xsi:type="expression" refId="myExpression" attribute="result" />
    <Target xsi:type="expression" refId="myExpression" attribute="operand1" />
文本可以包含通过绑定而更新的片段。
见 片段。
在绑定中使用一个文本。
Attribute  | 
值  | 
xsi:type  | 
text  | 
refId  | 
文本的完全合格的ID (namespace + text ID)  | 
attribute  | 
value  | 
例子
<Target xsi:type="text" refId="IAT/myTextID" attribute="value" />
有属性 mpLink的Widget 可以被绑定到一个mapp Link变量作为源。
在绑定中使用一个mapp Link变量。
Attribute  | 
值  | 
xsi:type  | 
mapp  | 
refId  | 
对一个mapp Link变量的引用  | 
attribute  | 
link  | 
例子
mapp Link变量必须只作为源变量使用。这意味着 mapp类型的目标 是 不允许的!
<Source xsi:type="mapp" refId="gAlarmXCore" attribute="link" />