首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >S7-1200/1500 做多个 FBs/FCs 块互连时的影响

S7-1200/1500 做多个 FBs/FCs 块互连时的影响

作者头像
科控物联
发布2022-03-29 21:06:55
发布2022-03-29 21:06:55
4600
举报
文章被收录于专栏:科控自动化科控自动化

块的互连会影响到执行顺序, 因此也会影响到块的接口参数的状态。

S7-1200 和 S7-1500 相互连接的 FCs /FBs 块的执行顺序按照它们的显示顺序执行。本例中的执行顺序是从左到右。

图 1

S7-1200 和 S7-1500 控制器只有当FC / FB 被执行,其布尔量标签的状态才能被获取。在上述示例程序中, 参数 "data".tag8 首先在函数块 “boolCallee1” 输出,然后再在函数块 “boolCallee2” 中被读入。

个人总结:

如果你不想费脑筋去研究各个品牌的差异.上面的程序直接放到2个程序块就好了.

下面的英文就不翻译,免得翻译的不精准,误导别人.

STEP 7 first calculates the networks and and assigns them local tags. Then the block call is compiled with the given parameters.

Description Because of a compiler rule in STL, binary inputs must be specified by FB/FC calls before the calls are executed. Since these can be interconnected with any networks, these networks are calculated first and assigned to local tags. Only then is the called compiled with the given formal parameters. Here the local tags take the place of the binary networks.

In the example below the order is made clear in the implementation in STL.

Fig. 1: Nested FC call with binary inputs

If you call the blocks nested in each other (Fig. 1),

  • STEP 7 first compiles the binary networks of the outer call (1).
  • In the second step STEP 7 compiles the networks of the inner call.
  • Then follows the inner FB/FC call (3).
  • Finally there is the outer FB/FC call (4).

This rule also applies if you only place one tag on the binary input as in this example.

Note In this sample program (Fig. 1) the right FB/FC call of "Modul_2" does not use the result of the first FB/FC call as input. Furthermore, we recommend distributing the FB/FC calls over two different networks.

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-02-23,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 科控物联 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档