#include "apdefap.h"
void MouseDown(char* lpszPictureName, char* lpszObjectName , short Button, short Shift, long x, long y)
{
#pragma option(mbcs)
// WINCC:TAGNAME_SECTION_START
// syntax: #define TagNameInAction "DMTagName"
// next TagID : 1
// WINCC:TAGNAME_SECTION_END
// WINCC:PICNAME_SECTION_START
// syntax: #define PicNameInAction "PictureName"
// next PicID : 1
// WINCC:PICNAME_SECTION_END
SetPropChar( lpszPictureName ,"画面窗口2","tagprefix","PUMP1."); //Return-Type: BOOL
SetPictureName( lpszPictureName,"画面窗口2","PUMP_CTL.PDL");
最佳答案
典型画面模板的应用,通过更改画面窗口前缀的名字,打开画面
SetPropChar( lpszPictureName ,"画面窗口2","tagprefix","PUMP1."); //把"画面窗口2"的前缀改成PUMP1
SetPictureName( lpszPictureName,"画面窗口2","PUMP_CTL.PDL");//打开该画面(即打开泵1的控制画面)
如果想通过按钮打开泵2的控制画面,则脚本如下
SetPropChar( lpszPictureName ,"画面窗口2","tagprefix","PUMP2."); //Return-Type: BOOL
SetPictureName( lpszPictureName,"画面窗口2","PUMP_CTL.PDL");
提问者对于答案的评价:
厉害,大神
原创文章,作者:ximenziask,如若转载,请注明出处:https://www.zhaoplc.com/plc356529.html