| <?xml version="1.0" encoding="UTF-8" ?> |
| <!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd"> |
| <FBType Comment="Event-Driven Up Counter" Name="E_CTU"> |
| <Identification Classification="Event-driven blocks" Function="Up-counter" Standard="61499-1-A.18"/> |
| <VersionInfo Author="IH" Date="2012-12-20" Organization="TU Wien" Remarks="added service sequences for test case specification" Version="0.3"/> |
| <VersionInfo Author="JHC" Date="2006-09-07" Organization="Holobloc Inc" Remarks="Changed package to fb.rt.events." Version="0.2"/> |
| <VersionInfo Author="JHC" Date="2001-04-27" Organization="Rockwell Automation" Remarks="XML version" Version="0.1"/> |
| <VersionInfo Author="JHC" Date="1999-01-22" Organization="Rockwell Automation" Remarks="SRC version" Version="0.0"/> |
| <CompilerInfo header="package fb.rt.events;"> |
| <Compiler Language="Java" Product="JDK" Vendor="Sun" Version="1.5.0"/> |
| </CompilerInfo> |
| <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 Event" Name="CUO" Type="Event"> |
| <With Var="Q"/> |
| <With Var="CV"/> |
| </Event> |
| <Event Comment="Reset Output Event" Name="RO" Type="Event"> |
| <With Var="Q"/> |
| <With Var="CV"/> |
| </Event> |
| </EventOutputs> |
| <InputVars> |
| <VarDeclaration Comment="Preset Value" Name="PV" Type="UINT"/> |
| </InputVars> |
| <OutputVars> |
| <VarDeclaration Comment="CV>=PV" Name="Q" Type="BOOL"/> |
| <VarDeclaration Name="CV" Type="UINT"/> |
| </OutputVars> |
| </InterfaceList> |
| <Service Comment="Event-Driven Up Counter" LeftInterface="FB interface" RightInterface="Runtime Environment"> |
| <ServiceSequence Name="Initial Count-up"> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=5;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=FALSE;CV:=1;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=5;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=FALSE;CV:=2;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=5;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=FALSE;CV:=3;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=5;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=FALSE;CV:=4;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=5;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=TRUE;CV:=5;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=5;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=TRUE;CV:=6;"/> |
| </ServiceTransaction> |
| </ServiceSequence> |
| <ServiceSequence Name="Count up and reset with PV=0"> |
| <ServiceTransaction> |
| <InputPrimitive Event="R" Interface="FB interface" Parameters=""/> |
| <OutputPrimitive Event="RO" Interface="FB interface" Parameters="Q:=FALSE;CV:=0;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=0;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=TRUE;CV:=1;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="R" Interface="FB interface" Parameters=""/> |
| <OutputPrimitive Event="RO" Interface="FB interface" Parameters="Q:=TRUE;CV:=0;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=1;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=TRUE;CV:=1;"/> |
| </ServiceTransaction> |
| </ServiceSequence> |
| <ServiceSequence Name="Count up with changing PV-values"> |
| <ServiceTransaction> |
| <InputPrimitive Event="R" Interface="FB interface" Parameters=""/> |
| <OutputPrimitive Event="RO" Interface="FB interface" Parameters="Q:=FALSE;CV:=0;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=1;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=TRUE;CV:=1;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=3;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=FALSE;CV:=2;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="CU" Interface="FB interface" Parameters="PV:=3;"/> |
| <OutputPrimitive Event="CUO" Interface="FB interface" Parameters="Q:=TRUE;CV:=3;"/> |
| </ServiceTransaction> |
| <ServiceTransaction> |
| <InputPrimitive Event="R" Interface="FB interface" Parameters=""/> |
| <OutputPrimitive Event="RO" Interface="FB interface" Parameters="Q:=FALSE;CV:=0;"/> |
| </ServiceTransaction> |
| </ServiceSequence> |
| </Service> |
| </FBType> |