“外放”电机控制程序条件逻辑的编写方法初探

已锁定

'Razor

西门子1847工业学习平台

  • 帖子

    3222
  • 精华

    38
  • 被关注

    214

论坛等级:至圣

注册时间:2008-03-31

钻石 钻石 如何晋级?

“外放”电机控制程序条件逻辑的编写方法初探

1103

5

2024-03-02 17:27:20

“外放”电机控制程序条件逻辑的编写方法初探

A Preliminary Study on the Method of Compiling Condition Logic of Control Program for "Out-amplifier" Motor

电机控制程序,很常用,也很常见;自己写过很多,也见过很多别人写的。

Motor control procedures, very common, but also very common; I have written a lot, but also seen a lot of other people write.

 

有封装成块的,也有未封装的。

Some are packaged into blocks, and some are unpackaged.

大部分都是,一个块,接口有很多参数,像下面这样的,

Most of them are a block, and interfaces have a lot of parameters, like the following.


个人对这种风格的块,是不太感冒的,参数太多,脑子不够用的,目标一多就晕乎;认知负荷太高,大脑缺氧。

Individuals are not very cold to this style of block, too many parameters, insufficient brain, a lot of targets on the dizzy; cognitive load is too high, brain hypoxia.

 

模式功能,仿真功能,通讯控制功能,状态输出功能,错误功能,凡此种种,皆应是“可选项”,要让用户拥有“配置”的权利,简单地说,应当具有“扩展性”。

Mode function, simulation function, communication control function, status output function, error function, all these, should be "optional", to let the user have the right to "configuration", simply said, should have "scalability".



 

 

如上图中最后一个网络所示,电机控制最本质的逻辑由三部分组成(变相地看,甚至可以看作是一部分,一个前提条件):

As shown in the last network above, the most essential logic of motor control consists of three parts (in a disguised way, it can even be regarded as a part, a prerequisite):

1、启动条件;

1. Starting conditions;

2、故障条件;

2. Fault conditions;

3、停止条件;

3. Stop conditions;

一个电机控制程序,每一部分包含的条件数量不一,有的只有一个启动条件,有的有多个; 有的只有一个故障条件,有的有多个;有的只有一个停止条件,有的有多个; 也就是说,条件的数量会有发生改变的需求,而此时,一般地做法是重新编辑整个电机块,改变接口,增删对应触点;我是不喜欢这种做法的。

A motor control program, each part contains a different number of conditions, some have only one start condition, some have multiple; some have only one fault condition, some have multiple; some have only one stop condition, some have multiple; that is, the number of conditions will have to change, and at this time, the general approach is to re-edit the entire motor block, change the interface, add and delete the corresponding contacts; I do not like this approach.

 

过去在京城做官的人,一旦因为政见不合,被在权力中心的掌权者所厌恶,通常都会被贬官外放,或者升官外放,总之,就是让放大你我在空间上的距离,从此不相见,也不相扰。

In the past, when officials in the capital were hated by those in power at the center of power because of political differences, they were usually demoted or promoted. In short, they enlarged the distance between us in space and never met or disturbed each other again.

 

这些前提条件能否外放?答案是肯定的,可以外放。

Can these preconditions be externalized? The answer is yes, it can be released.



 上图中的FB“HandleConditions",既是处理正向启动条件逻辑运算的功能块,它输出一个字“O_wCondGrpStatus"显示条件包各条件的当前状态,并集中输出一个位信号"bEnable",连接到FB"MotorControlLogic"的输入引脚"I_bForward"。

 

上面仅是举例正向启动信号的情况,其它信号类似。

正向启动条件包,包括多个正向启动的所有条件,打包成了数组结构,当条件数量需要改变时,完全可以在HMI/SCADA上设计简单的功能,即可实现不停机,不用连接电脑,通过简单的将新加点映射到条件包的方式实现修改。


电机控制逻辑块只依赖处理条件功能块的接口输出,也摆脱了大量复杂的条件逻辑算法,降低了复杂性,保持了简洁,对于不存在的输入触点功能引脚可以置TRUE处理。

条件包运算——>接口<——电机控制逻辑


以上就是对条件逻辑"外放"编程的一点初步尝试,想法不成熟,欢迎大家一起交流探讨。


“外放”电机控制程序条件逻辑的编写方法初探 已锁定
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-1200系列

共有14685条技术帖

SIMATIC S7-1200系列
版区标兵

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
X 图片
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。
 

西门子数字化工业支持中心网站服务须知

欢迎您来到西门子数字化工业支持中心网站!本网站及相关服务模块已集成SIEMENS ONEID一站式账户登录功能。同时,本网站使用了Cookie以增强网站导航、分析网站使用情况并协助我们开展营销和性能改进活动。继续浏览本网站,即表示您进一步同意并接受如下网站服务补充条款及网站隐私声明,包括关于Cookies信息收集和使用规则。

《网站服务补充条款》,以及

《网站隐私声明》,以及

您登录个人账户时须已同意《ONEID用户协议》《ONEID隐私声明》

访问此处可了解更多网站服务条款及声明。

继续浏览