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函数。

—— 完 ——
相关推荐
评论

立 为 非 似

中 谁 昨 此

宵 风 夜 星

。 露 , 辰

文章点击榜

细 无 轻 自

如 边 似 在

愁 丝 梦 飞

。 雨 , 花