wincc如何整点启动归档?

如何整点启动归档?

最佳答案

在"Global Script"下的Project functions编写函数cyclicarchive  
 BOOL cyclicarchive()  
 {  
  #pragma code ("kernel32.dll");  
 void GetLocalTime (SYSTEMTIME* lpst);  
  #pragma code();  
  SYSTEMTIME time;  
  Int t1;  
  GetLocalTime(&time);  
 t1=time.wMinute;  
 if(t1==00)  
 {  
  SetTagBit("startarchive",1);  
  return(BOOL)(GetTagBit("startarchive"));  
   }  
 }  
 在Tagloging中的"Properties of process tag"中的"Archive Tag"tab下的Archiving type选择Cycle-selective,在"Event"标签下的"Start Event"内选择cyclicarchive函数
参考资料:https://support.automation.siemens.com/CN/llisapi.dll?func=cslib.csinfo&lang=zh&siteid=cseus&aktprim=0&extranet=standard&viewreg=CN&objid=10805577&treeLang=zh

提问者对于答案的评价:
谢谢

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

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

相关推荐