西门子PLC 7288 SMART 200 系列大量现货 13922952859
siemens西门子PLC专注西门子PLC 7288系列 SMART 200系列现货销售
全国咨询热线:13922952859

针对用户自定义功能块(FB)如何创建相关的(HMI)块

时间:2022-08-28 12:43:17 作者:admin 点击:

介绍:

概述:
功能块被分配给块图标,块图标被分配给面板。 FB功能块, 块图标和面板组态定义了如何将块图标分配给特定的画面。您可以通过OS编译自动将块图标添加到画面,也可以在OS编译后手动将块图标添加到画面。在这个条目我们描述了这两种情况:n

关于 “Create/Update Block Icons…”功能的可用信息如下:n

PCS 7 在线帮助下 “Configuration Manual – Engineering System > Basic Concepts of Engineering > Type Definition, Reusability and Central Modifiability of Engineering Data > Application of Block Types, Faceplates and Block Icons”.n

  • PCS 7 在线帮助下 “Configuration Manual – Engineering System > Creating the PCS 7 Configuration > Creating the Master Data Library > Adapting Blocks > Using Faceplates and Block Icons for OS Pictures”.n
  • PCS 7 在线帮助下 “Configuration Manual – Operator Station > Configuring the OS Data in the SIMATIC Manager > Additional Editing in the OS Configuration > Function and Creation of Block Icons”.n
  • PCS 7 在线帮助下 “Configuration Manual – Operator Station > Configuring the OS Data in the SIMATIC Manager > Additional Editing in the OS Configuration > Create/Update Block Icons…”.n
  • PCS 7 在线帮助下 “Configuration Manual – Operator Station > Creating Process Pictures – Advanced > Function and Use of Block Icons and Faceplates”.n
  • 手册 “PCS 7 – Programming Instructions for Blocks”.
    这个文档可以通过ES开始菜单获得 “Start > SIMATIC > Documentation > English”.

自动生成块图标
如果您想在画面中自动创建块图标,您必须首先在画面 “@PCS7Typicals.PDL”中创建一个图标。这张画面是自动创建块图标的基础。如果您的项目不支持这种做法,那么复制画面@@PCS7Typicals.PDL” ,然后改变它的名字。
在该选项中,所需符号自动从 @…画面中复制到相关的装置画面中。n

警告!
在不同版本的PCS 7中模板文件 “@@PCS7Typicals.PDL”和 “@PCS7Typicals.PDL” 是不同的。相关信息请参考条目 ID 26697820.n

  1. 选择面板的类型一个类型(名字)。这个名字将被应用到FB和块图标中 (在这个例子中我们定义了 “CustomFB” 类型)。n
  2. 创建您的面板。n
  3. 给您的面板命名 “CustomFB”。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图1:面板的命名n

  1. 在画面”@PCS7Typicals.PDL”中创建适合的块图标。n
  2. 更改对象名为 “@CustomFB/1″。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图2:更改对象名n

  1. 更改对象类型为 “@CustomFB/1″。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图3: 更改对象类型n

  1. 改变 server name为 “PCS7 CustomFB Control”.n
  2. 标签名称包含标签和标签扩展 (例如 CustomFB.IstWert, CustomFB.UA, CustomFB.OA)。给相关标签扩展提供动态属性(例如. .IstWert, .UA, .OA)。注意标签的扩展属性包含一个点。组态后标签本身输入到 “tag name” 属性中。n
  3. 确定将FB的符号名在 CFC中改为 “CustomFB”。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图 4: 更改 FB 名称n

  1. 在SIMATIC Manager block folder 中选择相应的块,右击打开相关的功能块属性。在这个对话框中,您可以编辑 “Symbolic Name”。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图5: FB 属性n

  1. 编译 S7 程序。n
  2. 确定您已经激活了画面的自动生成块图标的属性。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图. 6: 从工厂层级获取块图标n

  1. 编译 OS,激活 “Create/update block icons” 功能

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图. 7:设置 OS 编译n

手动生成块图标:
如果您想手动的将块图标添加到您的画面中,那么在画面 “@Template.PDL”中创建您的块图标然后将其复制到相关的装置画面。n

  1. 为面板选择类型 (名字)。这个名字也将用于 FB 和块图标 (本例我们使用定义类型”CustomFB”).。n
  2. 创建面板。n
  3. 命名面板 “CustomFB”.

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图8:命名面板n

  1. 在”@Template.PDL”画面创建相应的块图标。n
  2. 更改对象名为 “@CustomFB/1″。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图9:更改对象名n

  1. 改变对象类型为 “@CustomFB/1”.

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图10:更改对象类型n

  1. 更改 server name为 “PCS7 CustomFB Control”.n
  2. 变量名包含标签和标签扩展(例如: CustomFB.IstWert, CustomFB.UA, CustomFB.OA)。给相关的标签扩展提供动态属性 (e.g. .IstWert, .UA, .OA)。确定标签扩展包含一个点。 组态后标签本身输入到 “tag name”中。n
  3. 从”@Template.PDL”复制块图标到你的工厂画面。n
  4. 在工厂画面,选择图标,打开动态向导。n
  5. 在默认的动态向导中选择 “Coect picture object with measuring point”。n
  6. 确定相关的标签名。

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图11:设定选项n

  1. 检查块图标的属性

针对用户自定义功能块(FB)如何创建相关的(HMI)块图标?

图12:块图标的属性