Commit 627cafac authored by Jörg Weingrill's avatar Jörg Weingrill
Browse files

added Overflow

parent 8d11efaa
......@@ -10,6 +10,7 @@ VAR_OUTPUT
AVG: REAL;
MINAVG: REAL;
MAXAVG: REAL;
Overflow: BOOL;
END_VAR
VAR
fbCycle :TON;
......@@ -28,10 +29,12 @@ END_VAR
buffer[index] := IN;
// increase the index
IF index < 10000 THEN
IF index < 30000 THEN
index := index + 1;
END_IF
Overflow := (index = 30000);
// during the first cycle number will be smaller than index
IF number < index THEN
number := index;
......@@ -64,6 +67,8 @@ END_IF]]></ST>
<LineId Id="45" Count="0" />
<LineId Id="44" Count="0" />
<LineId Id="23" Count="2" />
<LineId Id="77" Count="0" />
<LineId Id="76" Count="0" />
<LineId Id="42" Count="0" />
<LineId Id="41" Count="0" />
<LineId Id="27" Count="0" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment