blob: cf7ba0e8cfa9f0b997ae93efe25533cd28a27ade [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 Down Counter" Name="E_CTD">
<Identification Classification="Event-driven blocks" Description="Copyright (c) 2017 fortiss GmbH&#10;&#9;&#9;&#9; 2019 Johannes Keppler University Linz&#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" Function="Down-counter" Standard="61499-1-A.x"/>
<VersionInfo Author="Alois Zoitl" Date="2017-09-22" Organization="fortiss GmbH" Remarks="initial API and implementation and/or initial documentation" Version="1.0"/>
<VersionInfo Author="Alois Zoitl" Date="2019-07-09" Organization="JKU" Remarks="fixed bug in down counting" Version="1.1"/>
<CompilerInfo/>
<InterfaceList>
<EventInputs>
<Event Comment="Count Down" Name="CD" Type="Event"/>
<Event Comment="Load counter value" Name="LD" Type="Event">
<With Var="PV"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Comment="Count Down Output Event" Name="CDO" Type="Event">
<With Var="Q"/>
<With Var="CV"/>
</Event>
<Event Comment="Reset Output Event" Name="LDO" Type="Event">
<With Var="Q"/>
<With Var="CV"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Comment="Preset Value" Name="PV" Type="UINT"/>
</InputVars>
<OutputVars>
<VarDeclaration Comment="CV &lt;= 0" Name="Q" Type="BOOL"/>
<VarDeclaration Comment="" Name="CV" Type="UINT"/>
</OutputVars>
</InterfaceList>
<BasicFB>
<ECC>
<ECState Comment="" Name="START" x="240.0" y="90.0"/>
<ECState Comment="" Name="CD" x="865.0" y="90.0">
<ECAction Algorithm="CD" Output="CDO"/>
</ECState>
<ECState Comment="" Name="LD" x="450.0" y="610.0">
<ECAction Algorithm="LD" Output="LDO"/>
</ECState>
<ECTransition Comment="" Condition="CD[(CV &gt; 0)]" Destination="CD" Source="START" x="1035.0" y="460.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="CD" x="630.0" y="90.0"/>
<ECTransition Comment="" Condition="LD" Destination="LD" Source="START" x="395.0" y="510.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="LD" x="240.0" y="610.0"/>
</ECC>
<Algorithm Comment="Count Down" Name="CD">
<ST Text="CV := CV - 1;&#10;Q := (CV = 0);&#10;&#10;"/>
</Algorithm>
<Algorithm Comment="Load" Name="LD">
<ST Text="CV := PV;&#10;Q:= (CV = 0);&#10;"/>
</Algorithm>
</BasicFB>
</FBType>