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

50 lines
1.1 KiB
Plaintext

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
<POU Name="DEAD_BAND" Id="{f1b68de8-cffb-40ea-8a26-928203a05789}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION DEAD_BAND : REAL
VAR_INPUT
X : REAL;
L : REAL;
END_VAR
VAR
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[(*
version 1.2 18. jan. 2011
programmer hugo
tested by oscat
DEAD_BAND ist eine lineare Übertragungsfunktion mit Totzone. Die Funktion verschiebt den positiven Teil der Kurve um +L und den negativen Teil der Kurve um -L.
DEAD_BAND = X - L wenn X > L)
DEAD_BAND = X + L wenn X < -L
DEAD_BAND = 0 wenn Abs(X) <= L
*)
(* @END_DECLARATION := '0' *)
IF X > L THEN
DEAD_BAND := X - L;
ELSIF X < -L THEN
DEAD_BAND := X + L;
ELSE
DEAD_BAND := 0.0;
END_IF;
(* revision history
hm 2. nov. 2007 rev 1.0
original version
hm 14. jun. 2008 rev 1.1
improved performance
hm 18. jan. 2011 rev 1.2
assign 0 before return
*)]]></ST>
</Implementation>
<LineIds Name="DEAD_BAND">
<LineId Id="47" Count="29" />
<LineId Id="7" Count="0" />
</LineIds>
</POU>
</TcPlcObject>