<< 点击显示目录 >> 主页
mappServices帮助手册 > mapp IO 管理硬件配置 > 开始 Preparing the import and template files |
然后,定义要导入的硬件配置。为此已经创建了导入文件和模板文件:
通过 ID 为"$root "的 "模块 "节点应用当前配置中的 CPU。然后定义应将哪些模块导入哪个插槽。使用源代码名称指定模板文件的名称。
必须为每个模块创建两个模板文件。它们是 .ar 和 .io 文件。这两个文件的名称必须相同,只是扩展名不同。.ar 文件包含模块的属性。.io文件包含模块的I/O映射。
要获取模块的属性和 I/O 映射,必须在现有配置中打开 arconfig.br 或 iomap.br 文件。然后将相应模块的信息复制到.ar 或.io 文件中。这意味着这些信息将被包含所需模块的现有项目使用。这是获取.io 和.ar 信息的唯一途径。模块在现有项目中的位置并不重要。有关模板文件的更多信息,请参阅 此处。
这里可以看到,模块的模板文件中使用了.arconfig 文件的一部分:
为确保模板文件中引用的模块固件也在控制器上,需要使用 AS 中的 "Additionally supported hardware(额外支持的硬件)"功能。该选项在目标系统配置中定义。
Next, the hardware configuration to be imported is defined. The import file and the template files have already been created for this:
The CPU from the current configuration is applied via node "Module" with ID "$root". Then which modules should be imported to which slot is defined. The name of the template file is specified using the source name.
Two template files must be created for each module. These are the .ar and.io files. It is important that the files have the same name with only the extension being different. The.ar file contains the properties of a module. The.io file contains the I/O mapping for a module.
To obtain the properties and the I/O mapping of a module, the arconfig.br or the iomap.br file must be opened in an existing configuration. The information for the respective module is then copied into the.ar or.io file. This means that the information is used by an existing project that contains the desired modules. This is the only way to get the.io and.ar information. The slot the module is located in the existing project does not matter. For more information about the template files, see here.
Here you can see that a part of the.arconfig file is used in the template file for a module:
To ensure that the firmware for the modules referenced in the template files is also on the controller, function "Additionally supported hardware" in Automation Studio is used. This option is defined in the target system configuration.