blob: b25d1860744f9338d6181b002201b0cae5336ca8 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd">
<FBType Comment="Event driven up counter" Name="E_CTU">
<Identification Description="Copyright (c) 2017 fortiss GmbH&#13;&#10; &#13;&#10;This program and the accompanying materials are made&#13;&#10;available under the terms of the Eclipse Public License 2.0&#13;&#10;which is available at https://www.eclipse.org/legal/epl-2.0/&#13;&#10;&#13;&#10;SPDX-License-Identifier: EPL-2.0" Standard="61499-1 Annex 2"/>
<VersionInfo Author="Alois Zoitl" Date="2017-09-21" Organization="fortiss GmbH" Remarks="initial API and implementation and/or initial documentation" Version="1.0"/>
<InterfaceList>
<EventInputs>
<Event Comment="Count up" Name="CU" Type="Event">
<With Var="PV"/>
</Event>
<Event Comment="Reset" Name="R" Type="Event"/>
</EventInputs>
<EventOutputs>
<Event Comment="Count up output" Name="CUO" Type="Event">
<With Var="Q"/>
<With Var="CV"/>
</Event>
<Event Comment="Reset output" Name="RO" Type="Event">
<With Var="Q"/>
<With Var="CV"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Comment="Process Value" Name="PV" Type="UINT"/>
</InputVars>
<OutputVars>
<VarDeclaration Comment="True if CV &gt;= PV" Name="Q" Type="BOOL"/>
<VarDeclaration Comment="Counter Value" Name="CV" Type="UINT"/>
</OutputVars>
</InterfaceList>
<BasicFB>
<ECC>
<ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
<ECState Comment="" Name="CU" x="1570.0" y="165.0">
<ECAction Algorithm="CU" Output="CUO"/>
</ECState>
<ECState Comment="" Name="R" x="900.0" y="1000.0">
<ECAction Algorithm="R" Output="RO"/>
</ECState>
<ECTransition Comment="" Condition="CU[CV &lt; 65535]" Destination="CU" Source="START" x="970.0" y="210.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="CU" x="1285.0" y="510.0"/>
<ECTransition Comment="" Condition="R" Destination="R" Source="START" x="845.0" y="770.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="R" x="545.0" y="1050.0"/>
</ECC>
<Algorithm Comment="reset counter" Name="R">
<ST Text="CV := 0;&#13;&#10;Q := FALSE;"/>
</Algorithm>
<Algorithm Comment="count up" Name="CU">
<ST Text="CV := CV + 1;&#13;&#10;Q := (CV &gt;= PV);"/>
</Algorithm>
</BasicFB>
</FBType>