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.
 
 
 
 
 
 

48 lines
530 B

FUNCTION_BLOCK BS_DevHeart
VAR_EXTERNAL
END_VAR
VAR_INPUT
END_VAR
VAR_OUTPUT
HeartVavle :int;
END_VAR
VAR
ton1 :ton;
END_VAR
(*
20191003
1.0
*)
(*
Output_Type 输出
0-99
*)
ton1(pt:=t#2s);
ton1.in:=not ton1.q;
if ton1.q=1 then
HeartVavle :=HeartVavle+1;
end_if;
if HeartVavle =99 then
HeartVavle:=0;
end_if;
END_FUNCTION_BLOCK