恭喜,你发布的帖子
发布于 2020-11-28 12:41:02
3楼
伪代码,SCL:
if Value = LastValue then
Timer:=Timer + SampleTime; //或者计时器
End_if;
LastValue :=Value ; //存储上一个值,用于判断值是否有变化
Error: =(Timer > = 60*10); //自动复位Error
//以下为手动复位Error
if Timer > = 60*10 then
Error:=1;
end_if;
If ResetError then
Error:=0;
ResetError :=0;
end_if;
请填写推广理由:
分享
只看
楼主