<< 点击显示目录 >> 主页
mappServices帮助手册 > mapp IO 管理硬件配置 > 概念 Basic principle |
mapp IO 可用于在运行时管理硬件配置。这样就可以根据使用的硬件实现不同的机器类型。
为了能够使用不同的机器类型,必须创建一个项目,其中包含不同机器类型所需的所有模块。不仅要一次性添加所有必要的模块,还要添加所有必要的变体。例如,X20AT2402 添加了 J 型传感器,而另一个 X20AT2402 则添加了 K 型传感器。否则,如果指定插槽中没有硬件模块,控制器将以服务模式启动。
然后将项目传输至控制器。这将把以后用作参考的自动化运行时 (AR) 配置放到控制器上。所有所需模块的固件版本都会传输到控制器。
应加载的机器类型通过导入文件(XML 格式)定义。 导入文件可通过功能块 MpIOImport加载 。导入文件还可用于确定 I/O 映射,以建立软件和硬件之间的连接。
操作硬件模块必须具备 3 项必要条件:
•AR 配置: AR 配置包含模块的功能以及可能的参数和设置,例如温度传感器的类型或模拟输入是观察电压还是电流。模块的 AR 配置可在模块添加到硬件树后更改。
•固件: 嵌入模块中的软件,用于接收 AR 配置数据并根据设置操作模块。一旦模块添加到硬件树中,固件就会自动传输到控制器中。
•I/O 映射: I/O 映射定义了软件和硬件之间的连接。例如,可以定义模拟输入发送当前值的过程变量。模块的 I/O 映射可在模块添加到硬件树后更改。
导入文件定义了应在哪个位置使用哪个模块。这意味着 AR 配置和 I/O 映射可通过导入文件按需定义。 导入文件的结构将在 导入文件的结构部分进行说明 。
导入文件引用原始 AR 配置中的所需模块,并从中生成新的 AR 配置。导入过程详 见管理硬件配置部分。
新的 AR 配置生成后,也会立即启用。这与重启目标系统有关。但如果导入文件只更改了 I/O 映射,则无需重新启动。新的 I/O 映射会立即应用。
mapp IO can be used to manage the hardware configuration at runtime. This allows different machine types to be implemented depending on the hardware used.
In order to be able to use different machine types, a project must be created that contains all the required modules for the different machine types as a basis. Not only are all necessary modules added one time, but also all required variants. For example, X20AT2402 is added with sensor type J, while another X20AT2402is added with sensor type K. Module supervision ("Module supervised") should be disabled for all modules. Otherwise, the controller starts in service mode if the hardware modules are not present in the specified slots.
The project is then transferred to the controller. This puts the Automation Runtime (AR) configuration used later as a reference onto the controller. The firmware version for all required modules is transferred to the controller.
The machine type that should be loaded is defined using an import file (XML format). The import file can be loaded via function block MpIOImport. The import file can also be used to determine the I/O mapping in order to establish the connection between software and hardware.
3 things are necessary to operate a hardware module:
•AR configuration: The AR configuration contains the functionality of the module as well as possible parameters and settings, such as the type of temperature sensor or whether an analog input observes voltage or current. The AR configuration of a module can be changed after the module has been added to the hardware tree.
•Firmware: Software embedded in the module that receives the AR configuration data and operates the module according to the settings. The firmware is included in the transfer to the controller automatically as soon as the module has been added to the hardware tree.
•I/O mapping: I/O mapping defines the connection between software and hardware. The process variable where the analog input sends its current value can be defined, for example. The I/O mapping of a module can be changed after the module has been added to the hardware tree.
The import file defines which modules should be used at which position. That means the AR configuration and I/O mapping can be defined as desired via an import file. How an import file is structured is explained in section Structure of the import file section.
The import file references the desired modules that were present in the original AR configuration and generates a new AR configuration from them. The import process is described in detail in section Managing the hardware configuration.
After the new AR configuration is generated, it is also enabled immediately. This is tied to a restart of the target system. If only the I/O mapping was changed by the import file, however, no restart is performed. The new I/O mapping is applied immediately.