Skip to main content

小节:需求

本小节 IOMapping 允许模块 IO 指定属性(例如:24V 而不是 230V),这些属性应由设备 IO 提供以实现正确连接。在生成期间,可以将所需属性分配为设备 IO 的“提供”属性。该分配被存储为附加到设备描述文件中。

对于设备生成器的自动IO连接,这意味着每个具有“要求”属性的模块IO将扫描其父模块生成的设备或通配符,直到找到一个设备和IO通道,其“提供”属性满足需要

SEC IOMapping : <target>                           //optional: yes, modifier: [UPDATE]
    Parent := <target ID>;                           //optional: yes, type: ID
    SEC Demand                                          //optional: yes, modifier: [UPDATE]
            Desc := <description>;                       //optional: no, type: text
            Properties := [<property1>,<property2>,...]; //optional: no, type: IDList
    END_SEC
END_SEC
. 规格:
  • 各小节 DemandConnect 不能同时定义。

  • Desc 定义所需连接的(本地化)描述(在文本列表中)。

  • Properties 定义描述模块 IO 所需属性的属性列表(例如:[Input24V,数字]) 可以定义多个允许限定模块 IO 的属性(例如:仅需要“Property1”和模块的模块 IO)需要“Property1”、“Property2”等的 IO。)

  • Parent 定义通道应连接的设备的 ID。对于“要求较高”的 IO,也允许通配符设备作为可能的连接设备。

SEC std.DeviceGenerator
    SEC IOMapping : xOn
            SEC Demand
                    Desc := TL_Rooms.Role_RoomStandard_Lights;
                    Properties := [V24Output];
            END_SEC
    END_SEC
END_SEC