Hi,
Im trying to create a FB to fire specific events, depending on a
string in the DESC input.
Can anyone help me to fix my FB below or suggest a better way.
Thank you!
Anro
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FBType SYSTEM "
http://www.holobloc.com/xml/
LibraryElement.dtd" >
<FBType Name="Switch" Comment="Basic Function Block Type" >
<Identification Standard="61499-2" />
<VersionInfo Organization="Holobloc Inc" Version="0.3" Author="JHC"
Date="2009-09-15" Remarks="Changed transition priorities." />
<VersionInfo Organization="Rockwell Automation" Version="0.2"
Author="JHC" Date="2003-12-04" Remarks="Renamed for better indexing." /
>
<VersionInfo Organization="Rockwell Automation" Version="0.1"
Author="JHC" Date="2002-11-05" Remarks="Corrected missing ST element
in Algorithm REQ." />
<VersionInfo Organization="Rockwell Automation" Version="0.0"
Author="JHC" Date="2000-05-30" />
<CompilerInfo header="package fb.rt.RMSL1;" >
</CompilerInfo>
<InterfaceList>
<EventInputs>
<Event Name="INIT" Comment="Initialization Request" >
<With Var="QI" />
</Event>
<Event Name="REQ" Comment="Normal Execution Request" >
<With Var="QI" />
<With Var="DESC" />
</Event>
</EventInputs>
<EventOutputs>
<Event Name="INITO" Comment="Initialization Confirm" >
<With Var="QO" />
</Event>
<Event Name="CNF" Comment="Execution Confirmation" >
<With Var="QO" />
</Event>
<Event Name="STAT" >
</Event>
<Event Name="POSN" >
</Event>
<Event Name="OUTP" >
</Event>
<Event Name="SENS" >
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="QI" Type="BOOL" Comment="Input event
qualifier" />
<VarDeclaration Name="DESC" Type="WSTRING" />
</InputVars>
<OutputVars>
<VarDeclaration Name="QO" Type="BOOL" Comment="Output event
qualifier" />
</OutputVars>
</InterfaceList>
<BasicFB>
<ECC >
<ECState Name="START" Comment="Initial State" x="588.2353"
y="682.3529" >
</ECState>
<ECState Name="INIT" Comment="Initialization" x="341.17645"
y="82.352936" >
<ECAction Algorithm="INIT" Output="INITO" />
</ECState>
<ECState Name="REQ" Comment="Normal execution" x="135.29411"
y="1417.647" >
<ECAction Algorithm="REQ" Output="CNF" />
</ECState>
<ECState Name="TrigSTAT" x="3241.1765" y="123.52941" >
<ECAction Output="STAT" />
</ECState>
<ECState Name="TrigPOS" x="3235.294" y="517.64703" >
<ECAction Algorithm="REQ" Output="POSN" />
</ECState>
<ECTransition Source="INIT" Destination="START" Condition="1"
x="223.5294" y="600.0" />
<ECTransition Source="START" Destination="TrigSTAT"
Condition="REQ [DESC = "A"]" x="1676.4706" y="123.52941" />
<ECTransition Source="START" Destination="TrigPOS"
Condition="REQ [DESC = "B"]" x="2017.647" y="517.64703" />
<ECTransition Source="START" Destination="REQ" Condition="REQ"
x="588.2353" y="1052.9412" />
<ECTransition Source="START" Destination="INIT" Condition="INIT"
x="588.2353" y="282.35294" />
<ECTransition Source="REQ" Destination="START" Condition="1"
x="229.41176" y="835.2941" />
<ECTransition Source="TrigSTAT" Destination="START"
Condition="1" x="1676.4706" y="252.94118" />
<ECTransition Source="TrigPOS" Destination="START" Condition="1"
x="1847.0588" y="635.2941" />
</ECC>
<Algorithm Name="INIT" Comment="Initialization algorithm" >
<ST />
</Algorithm>
<Algorithm Name="REQ" Comment="Normally executed algorithm" >
<ST />
</Algorithm>
</BasicFB>
</FBType>