回复:Wincc显示历史趋势

冲向蓝天

西门子1847工业学习平台

  • 帖子

    236
  • 精华

    2
  • 被关注

    34

论坛等级:侠士

注册时间:2007-07-25

普通 普通 如何晋级?

发布于 2010-06-18 15:13:12

6楼

用下列脚本可以使属性StartTime和EndTime动态化。将该脚本复制到“编辑动作”对话框的编辑域中,并单击“确定”。
//设置Trend1的索引
SetPropWord("NewPdl0.Pdl","Control1","Index",0); //返回类型:BOOL SetPropBOOL("NewPdl0.PDL","Control1","Online",FALSE); SetPropBOOL("NewPdl0.PDL","Control1","TimeRange",FALSE);
SetPropBOOL("NewPdl0.PDL","Control1","Activate",FALSE);
//设置BeginTime参数:dd.mm.yyyy hh:mm:ss
SetPropChar("NewPdl0.PDL","Control1","BeginTime",GetTagChar("strVar_1"));
//设置EndTime参数:dd.mm.yyyy hh:mm:ss
SetPropChar("NewPdl0.PDL","Control1","EndTime",GetTagChar("strVar_2"));
//设置Trend2的索引
SetPropWord("NewPdl0.Pdl","Control1","Index",1); //返回类型:BOOL
SetPropBOOL("NewPdl0.PDL","Control1","Online",FALSE);
SetPropBOOL("NewPdl0.PDL","Control1","TimeRange",FALSE);
SetPropBOOL("NewPdl0.PDL","Control1","Activate",FALSE);
//设置BeginTime参数:dd.mm.yyyy hh:mm:ss
SetPropChar("NewPdl0.PDL","Control1","BeginTime",GetTagChar("strVar_1"));
//设置EndTime参数:dd.mm.yyyy hh:mm:ss
SetPropChar("NewPdl0.PDL","Control1","EndTime",GetTagChar("strVar_2"));
//激活图表控件处的BeginTime和EndTime
SetPropBOOL("NewPdl0.PDL","Control1","Activate",TRUE);

起飞!
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有31467条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

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

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

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