<< 点击显示目录 >> 主页
mappServices帮助手册 > mapp IO 管理硬件配置 > 概念 LN |
•Attributes
•ID: 创建 IO 映射的数据点名称(如 "IF6.ST1")。
•DPName: 将连接的过程变量名称(例如 "Program:MyPV")。
•Device: 定义更新值的任务类别。如果没有指定值,则默认使用 "TC#1-CPYDEV "作为任务类别。
•Inverted: "反相 "可用于反相输入。对于输入端,这意味着相应通道上的值将被反相并转移到分配的变量中。如果输入要反相,可以指定"Inverted=true"。如果未指定任何值,则不反相输入。
•Mode: 定义如何处理已存在的条目(例如 "替换")。模式 "有以下几种可能:
•Add: 添加已定义的映射,而不删除已存在的映射。该模式仅适用于输入,并且是这些输入的默认值.
•Replace: 用导入文件中定义的映射替换已有的映射。这是输出的默认模式。
•Clear: 删除现有映射,但不定义新映射。
模块的 I/O 映射定义如下
<IOCFG xmlns="http://www.br-automation.com/AR/IO" Version="2.0">
<Module ID="IF3.ST1.IF1.ST2" Hardware="X20DO9322" >
<LN ID="DigitalOutput03" DPName="doOutput2" />
</Module>
</IOCFG>
这也适用于第三方硬件。有关更多信息,请参阅 使用特殊硬件。
模块 "节点的结束标记必须位于所有 "LN "节点之后!
例如
本示例介绍如何使用 "替换 "模式。在项目中,以下变量被映射到数字输入端:
如果要交换映射过程变量,可在导入文件中指定以下内容:
<IOCFG xmlns="http://www.br-automation.com/AR/IO" Version="2.0">
<Module ID="$root" Source="AR" SourceID="$root" />
<Module ID="IF6.ST1" Source="AR" SourceName="InputModule01" >
<LN ID="DigitalInput01" Mode="Replace" DPName="::Input02" />
<LN ID="DigitalInput02" Mode="Replace" DPName="::Input01" />
</Module>
</IOCFG>
本示例介绍如何使用 "清除 "模式。在该项目中,下列过程变量被映射到数字输入端:
如果要清除映射,可在导入文件中指定以下内容:
<IOCFG xmlns="http://www.br-automation.com/AR/IO" Version="2.0">
<Module ID="$root" Source="AR" SourceID="$root" />
<Module ID="IF6.ST1" Source="AR" SourceName="InputModule01" >
<LN ID="DigitalInput01" Mode="Clear" />
<LN ID="DigitalInput02" Mode="Clear" />
<LN ID="DigitalInput03" Mode="Clear" />
</Module>
</IOCFG>
This element allows an I/O mapping to be defined for a module.
•Attributes
•ID: Name of the data point for which an IO mapping is created (e.g. "IF6.ST1").
•DPName: Name of the process variable that will be connected (e.g. "Program:MyPV").
•Device: Defines the task class in which the value is updated. If no value is specified, "TC#1-CPYDEV" is used as the task class by default.
•Inverted: "Inverted" can be used to invert an input. For inputs, this means that the value on the respective channel is taken, inverted and transferred to the assigned variable. This function is not available for outputs. "Inverted=true" can be specified if the input should be inverted. If nothing is specified, the input is not inverted.
•Mode: Defines how pre-existing entries are handled (e.g. "Replace"). The following possibilities are available for "Mode":
•Add: Adds the defined mapping without removing already existing ones. This mode is only possible for inputs and is the default value for these.
•Replace: Replaces already existing mappings with the one defined in the import file. This is the default mode for outputs.
•Clear: Deletes an existing mapping without defining a new one.
The I/O mapping for a module is defined as follows:
<IOCFG xmlns="http://www.br-automation.com/AR/IO" Version="2.0">
<Module ID="IF3.ST1.IF1.ST2" Hardware="X20DO9322" >
<LN ID="DigitalOutput03" DPName="doOutput2" />
</Module>
</IOCFG>
This also applies to 3rd-party hardware. For additional information, see Working with special hardware.
The closing tag for node "Module" must come after all "LN" nodes!
Examples:
This example explains how to use mode "Replace". In the project, the following variables are mapped to the digital inputs:
If the mapped process variables should be exchanged, the following can be specified in the import file:
<IOCFG xmlns="http://www.br-automation.com/AR/IO" Version="2.0">
<Module ID="$root" Source="AR" SourceID="$root" />
<Module ID="IF6.ST1" Source="AR" SourceName="InputModule01" >
<LN ID="DigitalInput01" Mode="Replace" DPName="::Input02" />
<LN ID="DigitalInput02" Mode="Replace" DPName="::Input01" />
</Module>
</IOCFG>
This example explains how to use mode "Clear". In the project, the following process variables are mapped to the digital inputs:
If mapping should be cleared, the following can be specified in the import file:
<IOCFG xmlns="http://www.br-automation.com/AR/IO" Version="2.0">
<Module ID="$root" Source="AR" SourceID="$root" />
<Module ID="IF6.ST1" Source="AR" SourceName="InputModule01" >
<LN ID="DigitalInput01" Mode="Clear" />
<LN ID="DigitalInput02" Mode="Clear" />
<LN ID="DigitalInput03" Mode="Clear" />
</Module>
</IOCFG>