WinCC Web Navigator在客户端浏览时,无法切换

WinCC Web Navigator在客户端浏览时,无法通过以下按钮切换,按钮代码如下:

 #include "apdefap.h"
 void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
 {
   int i;
    char *buffer[11]={"Btn1","Btn2","Btn3","Btn4","Btn5","Btn6","Btn7","Btn8","Btn9","Btn10","Btn11"};
 // zzzFCEZone_FCE-SRV::YCJK-SlabIdtf.pdl为服务器上画面
   SetPropChar("Start.pdl","PicWin","PictureName","zzzFCEZone_FCE-SRV:: xxxx-SlabIdtf.pdl"); 
   for (i=1;i<=11;i++)
   {
     if (i == 1)
     {
       SetPropWord(lpszPictureName,lpszObjectName,"BackColor",65535);  
       SetPropWord(lpszPictureName,lpszObjectName,"BorderColorTop",8421504);  
       SetPropWord(lpszPictureName,lpszObjectName,"BorderColorBottom",16777215); 
     }
     else
     {
       SetPropWord(lpszPictureName,buffer[i-1],"BackColor",13160661);  
       SetPropWord(lpszPictureName,buffer[i-1],"BorderColorTop",16777215);  
       SetPropWord(lpszPictureName,buffer[i-1],"BorderColorBottom",8421504); 
     }      
   }

 #define RUN_ON_WEBNAVIGATOR
 #ifdef RUN_ON_WEBNAVIGATOR
 //int i;  //char*buffer[11]={"Btn1","Btn2","Btn3","Btn4","Btn5","Btn6","Btn7","Btn8","Btn9","Btn10","Btn11"}
 // xxxx-SlabIdtf.pdl为本地画面
  SetPropChar("Start.pdl","PicWin","PictureName","xxxx-SlabIdtf.pdl"); 
 #endif
 以上代码WINCC上通过.为什么在WEB Navigator只显示主界面,无法通过该按钮切换呢.?? 在线等............

问题补充:

 // zzzFCEZone_FCE-SRV::YCJK-SlabIdtf.pdl为服务器上画面
 //上述写法为WINCC BASIC系统的写法,不能用于WEB NAVIGATOR中。
 问题已解决,可以通过此按钮实现在画面之间的切换。
 #ifdef RUN_ON_WEBNAVIGATOR
 //do something
 #elseif
 //do something another
 #endif

最佳答案

在用户管理里,看看是不是权限设置有问题,要不把访问用户的权限先都设上看看行不行。

提问者对于答案的评价:
自己解决了,不过还是把分给你吧。我是:
#ifdef RUN_ON_WEBNAVIGATOR
//do something
#elseif
//do something another
#endif
解决的。

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc269016.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2019年6月11日
下一篇 2019年6月11日

相关推荐