PCS7添加查询曲线,利用WINCC软件
工具/原料
西门子PCS7软件
WINCC软件
方法/步骤
1、在画面中,插入picturewindows控件控件取名为,pop1
2、对显示的数值区域,右击属性,添加鼠标动作。
3、C动作代码如下#include&quo隋茚粟胫t;apdefap.h"voidOnClick(char*lpszPictureNa罪焐芡拂me,char*lpszObjectName,char*lpszPropertyName){char*TemplateWindow="pop1";char*TemplateTypePicture=GetPictureName(lpszPictureName,TemplateWindow);SetPictureName(lpszPictureName,TemplateWindow,"pop_trend.PDL"); //Return-Type:BOOLSetVisible(lpszPictureName,TemplateWindow,1);SetLeft(lpszPictureName,TemplateWindow,640-GetWidth(lpszPictureName,TemplateWindow)/2); //Return-Type:longint//Return-Type:BOOLSetTop(lpszPictureName,TemplateWindow,512-GetHeight(lpszPictureName,TemplateWindow)/2);SetPropWord("pop_trend","Control1","index",0); //Return-Type:BOOLSetPropChar("pop_trend","Control1","Tagname","SystemArchive\\CDQ/AUX/SCALE/AIO_DEAL/FT110.OUT_ACT");SetPropChar("pop_trend","Control1","Name","流量");SetPropChar(lpszPictureName,TemplateWindow,"CaptionText","气体流量");SetPropWord("pop_trend","Control1","BeginValue",0);SetPropWord("pop_trend","Control1","EndValue",1000);}