<< 点击显示目录 >> 主页
mappServices帮助手册 > mapp IO 管理硬件配置 > 库 > 功能块 Description |
该功能块需要 MpIO 配置的 MpLink。
功能块 MpIOImport 管理硬件配置的导入。除了修改硬件配置外,还可通过新配置导入 NC 映射或 I/O 映射。使用 "ImportAllowed(允许导入)"可执行两种功能:
导入新硬件配置
使用输入 "Import(导入)"导入由输入 "FileName(文件名)"定义的硬件配置。输入 "ImportAllowed(允许导入)"用作额外的安全机制,以防止在不正确的时间导入配置。 必须设置 "Import = TRUE(导入)"和 "ImportAllowed = TRUE(允许导入)"才能导入新配置。如果 "CommandDone = TRUE "表示命令已执行。要开始执行新命令,必须将前一条命令设置为 "FALSE"。现在功能块已准备好执行新命令。
检查硬件配置
启用 mapp IO("Enable = TRUE")后,系统将检查备份文件设备中的硬件配置和从 ROM 中加载的硬件配置是否一致。如果不一致,则说明硬件配置已从外部修改(即未使用 mapp IO)。现在可以继续使用新的硬件配置,或者重新启用上次通过 mapp IO 导入的配置。这一决定由参数 "ImportAllowed(允许导入)"控制。有关更多信息,请参阅管理硬件配置一节。 管理硬件配置
导入文件与 AR 使用的 arconfig、iomap 和 NC 映射格式兼容。因此可以导入由 AS 生成的数据。
此外,还可以引用原始 AR 配置文件或模板文件中的现有数据。在导入过程中,所有这些文件将被合并以创建硬件配置。
有关导入文件结构的更多信息,请参阅 此处。
在导入过程中,可以检查进程变量和硬件模块之间的映射是否具有某些特征。具体来说,可以检查以下内容:
•...控制器上是否存在指定的过程变量。
•...过程变量的数据类型是否与输入/输出的数据类型一致。
•...PV 是否连接到多个输入端。
•...导入文件中指定的模块是否不存在。
•...模块是否被添加到不存在的位置或已被占用的位置。
如果其中一项检查失败,则仍会尽可能导入数据,并在功能块上输出错误信息。
如果在项目下载期间调用该功能块,控制器上可能还不存在某些 PV。在这种情况下,功能块将显示错误。
更多信息,请参阅 MpIO 配置一节 。
This function block requires the MpLink of an MpIO configuration.
This function block requires the MpLink of an MpIO configuration.
Function block MpIOImport manages the import of hardware configurations. In addition to modified hardware configurations, the NC mapping or I/O mapping can be imported via a new configuration. Two functions can be performed using "ImportAllowed":
Importing a new hardware configuration
The hardware configuration defined by input "FileName" is imported using input "Import". Input "ImportAllowed" is used as an additional safety mechanism to prevent a configuration from being imported at an incorrect time. "Import = TRUE" as well as "ImportAllowed = TRUE" must be set in order to import a new configuration. If "CommandDone = TRUE", the command has been executed. To start a new command, the previous command must be set to FALSE. The function block is now ready to execute a new command.
Checking the hardware configuration
When mapp IO is enabled ("Enable = TRUE"), the system checks whether the hardware configuration from the backup file device and the hardware configuration loaded from ROM are identical. If this is not the case, then the hardware configuration was modified externally (i.e. not using mapp IO). The new hardware configuration can now be used further, or the configuration last imported via mapp IO is enabled again. This decision is controlled by parameter "ImportAllowed". For additional information about this, see section Managing the hardware configuration. Managing the hardware configuration
The import file is compatible with the arconfig, iomap and NC mapping formats used by AR. This makes it possible to import the data generated by Automation Studio.
In addition, existing data from the original AR configuration or template files can be referenced. During import, all of these files are combined to create the hardware configuration.
For more information about the structure of the import file, see here.
During import, the mapping between process variable and hardware module can be checked for certain characteristics. Specifically, the following can be checked:
•...Whether the specified process variables exist on the controller.
•...Whether the data types of the process variables match the data types of the inputs/outputs.
•...Whether a PV was connected to multiple inputs.
•...Whether a module specified in the import file does not exist.
•...Whether a module was added to a non-existing position or a position that is already occupied.
If one of these checks fails, the data is still imported as much as possible and an error is output on the function block.
If the function block is called during a project download, some PVs may not yet exist on the controller. The function block will indicate an error in this case.
For more information, see section MpIO configuration.