#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
// WINCC:TAGNAME_SECTION_START
// syntax: #define TagNameInAction "DMTagName"
// next TagID : 1
// WINCC:TAGNAME_SECTION_END
// WINCC:PICNAME_SECTION_START
// syntax: #define PicNameInAction "PictureName"
#define PicName_M "PA5_bld06.pdl"
// next PicID : 2
// WINCC:PICNAME_SECTION_END
char* tagname=SysMalloc(200);
SetPropBOOL(PicName_M,"Smel","Activate",FALSE); //Rückgabe-Typ :BOOL
SetPropChar(PicName_M,"Smel","TagName","PCInfo\\DiskFree_C"); //Rückgabe-Typ :BOOL
SetPropBOOL(PicName_M,"Smel","TimeAxis",FALSE); //Rückgabe-Typ :BOOL
SetPropChar(PicName_M,"Smel","Label","MByte"); //Rückgabe-Typ :BOOL
SetPropWord(PicName_M,"Smel","Index",0);
PDLRTGetPropEx(0,PicName_M,"Smel","TagName",VT_LPSTR,&tagname,NULL,NULL,0,NULL,NULL);
SetPropChar(PicName_M,"Trend1","OutputValue",tagname);
SetPropWord(PicName_M,"Smel","Index",1);
PDLRTGetPropEx(0,PicName_M,"Smel","TagName",VT_LPSTR,&tagname,NULL,NULL,0,NULL,NULL);
SetPropChar(PicName_M,"Trend2","OutputValue",tagname);
SetPropWord(PicName_M,"Smel","Index",2);
PDLRTGetPropEx(0,PicName_M,"Smel","TagName",VT_LPSTR,&tagname,NULL,NULL,0,NULL,NULL);
SetPropChar(PicName_M,"Trend3","OutputValue",tagname);
SetPropWord(PicName_M,"Smel","Index",3);
PDLRTGetPropEx(0,PicName_M,"Smel","TagName",VT_LPSTR,&tagname,NULL,NULL,0,NULL,NULL);
SetPropChar(PicName_M,"Trend4","OutputValue",tagname);
SetVisible(PicName_M,"Trend_sel",0); //Rückgabe-Typ :BOOL
SetPropBOOL(PicName_M,"Smel","Activate",TRUE); //Rückgabe-Typ :BOOL
}
图片说明:
最佳答案
这个看起来是选择趋势中的4个曲线,选择哪个哪个就显示。
提问者对于答案的评价:
谢谢
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc208443.html