<?xml version="1.0" encoding="utf-8"?>
<Pou FileVersion="200.00.003" Name="FlowTotalizer" ElementGuid="88be61f4-7c0b-465f-9894-13192a9bfa6f" Comment="" SingleTextLine="" Language="ST" CustomFbd="0" Localization="Prj" GroupName="(User defined)" GenDebugInfo="false" UseResPassword="true" GenerateSymbMon="true" Is1499="false">
  <Program />
  <LocalVars>
    <Variable Name="TON_Totalizer" DataType="TON" InitialValue="" Comment="" Address="" Modifier="NonRetain" Kind="Var" Alias="" AccessRights="ReadWrite" StringSize="0" RetainFlags="" CommentFields="" Attributes="0" GroupName="" />
    <Variable Name="COP_1" DataType="COP" InitialValue=",,,,2(),,2(0),2(0)" Comment="" Address="" Modifier="NonRetain" Kind="Var" Alias="" AccessRights="ReadWrite" StringSize="0" RetainFlags="" CommentFields="" Attributes="0" GroupName="" />
  </LocalVars>
  <PouBody><![CDATA[PROGRAM FlowTotalizer
TON_Totalizer(NOT(TON_Totalizer.Q), T#10s);

IF TON_Totalizer.Q THEN
	Flow_Today := Flow_Today + (Flowrate * (10.0 / 60.0));
END_IF;

IF ((CurrentTimeRTC.hour = 0) AND (CurrentTimeRTC.minute = 0) AND (CurrentTimeRTC.second = 0)) THEN
	Flow_Yesterday := Flow_Today;
	Flow_Today := 0.0;
END_IF;

END_PROGRAM]]></PouBody>
  <PouUIProperties>
    <Root Version="6">
  <LanguageContainerStyle CommentTextColor="Green" CommentFont="Courier New, 10pt" PonctuationTextColor="Black" PonctuationFont="Courier New, 10pt" IdentifierTextColor="Black" IdentifierFont="Courier New, 10pt" OperatorTextColor="Black" OperatorFont="Courier New, 10pt" ReservedWordTextColor="Fuchsia" ReservedWordFont="Courier New, 10pt" PouTextColor="BlueViolet" PouFont="Courier New, 10pt" NumberTextColor="Firebrick" NumberFont="Courier New, 10pt" StringTextColor="Gray" StringFont="Courier New, 10pt" EditorTextAreaBackgroundColor="White" EditorFont="Courier New, 10pt" Index="0" />
</Root>
  </PouUIProperties>
</Pou>