SET_M(winderStart&winderstop,winderlowspeed);
RST_M(NOT Angleextremelimi OR winderStart=FALSE&winderstop=FALSE ,winderlowspeed);
winderrun:=relay&Angleextremelimi;
SET_M(NOT Angleextremelimi&winderstop&winderStart OR winderStart ,relay);
RST_M(NOT winderstop ,relay);
IF winderstop=TRUE&winderlowspeed=TRUE&Angleextremelimi=FALSE THEN relay:=TRUE;END_IF;
MOVE_E(Anglesignal>=11500,K0,winderspeed);
Angle_v:=(Anglesignal/60)-104;
winderfaultzs:=invfault&SM412 OR Anglesignal>=12000&relay&NOT winderlowspeed&SM412;
winderrunzs:=relay&SM412&NOT Angleextremelimi OR winderlowspeed OR winderrun;
MOVE_E(relay&Anglesignal<12000&CUT_speed=0,K600,winderspeed);
IF Anglesignal<12000&relay&CUT_speed>0 THEN
Saving1:=INT_TO_REAL(CUT_speed)+(INT_TO_REAL(Anglesignal)-e6000);
Saving2:=(INT_TO_REAL(p_Increase)*e3.14*e286/e1000)/INT_TO_REAL(K80);
winderspeed:=REAL_TO_INT(Saving1/Saving2);
END_IF;
MOVE_E(winderspeed>=16000,K16000,winderspeed);
。。。
VAR_INPUT winderStart Bit
VAR_INPUT winderstop Bit
VAR_INPUT Angleextremelimi Bit
VAR_INPUT Anglesignal Word[Signed]
VAR_INPUT invfault Bit
VAR_OUTPUT winderrun Bit
VAR_OUTPUT winderlowspeed Bit
VAR Saving1 FLOAT (Single Precision)
VAR Saving2 FLOAT (Single Precision)
VAR relay Bit
VAR_OUTPUT winderspeed Word[Signed]
VAR_OUTPUT winderfaultzs Bit
VAR_OUTPUT winderrunzs Bit
VAR_OUTPUT Angle_v Word[Signed]
VAR_INPUT p_Increase Word[Signed]
VAR_INPUT CUT_speed Word[Signed]