WinCC 实现点击设备弹出设置窗口

本功能实现点击电机图标实现设置电机频率的窗口。

右击电机属性,在事件中编写C代码实现功能。

下面是代码的对应功能。其中的接口模板3.pdl是一个画面窗口,所对应的标题等信息。

在变量中定义两个变量分别用于存储位置信息。B_win_x; B_win_y;feedbin1_motorA_fre_setval; feedbin1_motorA_mst;

选择一个层,拖放一个画面窗口。

在画面窗口属性中将其属性名称改为"Ctrl1"

在画面窗口的几何属性中位置X,位置Y分别关联上面新建的位置信息变量。

根据实际需要新建一个PDL接口画面,并命名为"接口模板3.PDL"

在接口模板3.pdl中关联变量,注:关联的变量只要写后缀的部分就可以了,因为前缀是公共的部分,在C代码中已经实现了。其实本例中只关联了两个变量。

对于数值型数据关联也是一样的,只要写后缀部分就可以了。

在另一个电机设备上在命名变量的时候,在变量中定义两个变量分别feedbin1_motorB_fre_setval; feedbin1_motorB_mst; 它的特点是通过前缀来区分不同的变量。

转载请注明出处:  https://www.cntworld.cn
智能工控 » WinCC 实现点击设备弹出设置窗口

4 评论

  1. I am extremely impressed along with your writing abilities as well as with the structure to your blog. Is that this a paid theme or did you customize it yourself? Anyway keep up the nice high quality writing, it’s rare to peer a nice blog like this one today. I like cntworld.cn ! It’s my: Beacons AI

  2. I am really inspired together with your writing talents and also with the layout for your weblog. Is this a paid subject matter or did you customize it yourself? Either way keep up the excellent high quality writing, it is uncommon to look a great blog like this one nowadays. I like cntworld.cn ! My is: Beacons AI

  3. Hello there! Do you know if they make any plugins to help with
    SEO? I’m trying to get my site to rank for some targeted keywords but I’m not seeing very
    good success. If you know of any please share.
    Kudos! You can read similar art here: [Your destiny](https://www.codeofdestiny.art “Your destiny”)

  4. Good day! Do you know if they make any plugins to help with Search Engine
    Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains.
    If you know of any please share. Kudos! You can read similar blog here:
    [Wool product](https://www.ecobij.nl/about/ “Wool product”)

回复 Armanda 取消回复

提供最优质的资源集合

立即查看 了解详情