You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
762 B

4 months ago
FUNCTION_BLOCK BS_Feedback
VAR_EXTERNAL
END_VAR
VAR_INPUT
Control :BOOL; (*设备控制指令*)
Run :BOOL; (*设备运行状态反馈*)
END_VAR
VAR_OUTPUT
ALARM :BOOL; (*设备电气控制箱故障报警*)
END_VAR
VAR
TON1 :TON;
TOF1 :TOF;
END_VAR
(*
时 间:20191003
版 本:1.0
作 者:姚立
名 称:控制反馈不一致报警
说 明:注:设备电气控制箱控制指令与设备运行反馈不一致故障检测,检测故障产生原因电箱没电、断路器断开、中间继电器与接触器故障等
备 注:
*)
TON1( IN:=Control , PT:=t#15S);
TOF1( IN:=Control , PT:=t#15S);
IF TON1.q=1 or TOF1.q=1 then
if Control<>Run then
ALARM:=1;
else
ALARM:=0;
end_if;
END_IF;
END_FUNCTION_BLOCK