恭喜,你发布的帖子
发布于 2015-11-24 13:33:59
2楼
根据你的需求, 我按自己的理解如下:
BOOL s_run = GetTagBit("run"); //启动标志
if(s_run)
{
SetTagFloat("Dis_WaterPos", GetTagFloat("Act_WaterPos"));//运行状态, 显示实际水位, Dis //是I棒图连接的变量;
}
else
{
SetTagFloat("Dis_WaterPos", GetTagFloat("Set_WaterPos"));//not运行状态, 显示set水位, Dis是I棒图连接的变量;
}
//time expires., Action with one second period.
int t = GetTagWord("time");
if(t && GetTagBit("run")) // when t is not zero and the system is running, time is expiring.
{
SetTagWord("time", --t);
}
if(!t && GetTagBit("run")) //when t is zero and the system is running, it triggles //time_expired event.
{
SetTagWord("Time_Expired", true); // when time expires, set a bool tag.
}
请填写推广理由:
分享
只看
楼主