| 作者 | 主题 |
|---|---|
|
泽诗冯冯 侠士 经验值:1008 发帖数:19 精华帖:3 |
楼主
主题:WINCC 水流动画 一种简单的实现办法
WINCC 水流动画 一种简单的实现办法 【运行效果很好】 1、根据管道走向绘制折线段,设置折线属性【线宽:4,线性:虚线】 2、当前值坐标添加vbs属性【只需根据实际修改坐标起始值】 【详细直接参考pdl文件】 Function ActualPointLeft_Trigger(Byval Item) '触发器 标准周期250ms Dim poly Dim lft Set poly=ScreenItems("折线1") poly.Index=1 lft=poly.ActualPointLeft If lft<410 Then 'X位置 ActualPointLeft_Trigger=lft+3 End If If lft>=410 Then 'X位置+10 lft=400 'X位置 ActualPointLeft_Trigger=lft End If End Function Function ActualPointTop_Trigger(Byval Item) '触发器 标准周期250ms Dim poly Dim tp Set poly=ScreenItems("折线2") poly.Index=1 tp=poly.ActualPointTop If tp<310 Then 'Y位置 ActualPointTop_Trigger=tp+3 End If If tp>=310 Then 'Y位置+10 tp=300 'Y位置 ActualPointTop_Trigger=tp End If End Function 【脚本选择其中一个就可以了】 【版本wincc7.4sp1】
zsff
|