Small refactoring
- Moved fb's around - Removed libraries from repo
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -39,7 +39,7 @@ LineIDs.dbg.bak
|
|||||||
# exclude not required folders
|
# exclude not required folders
|
||||||
**/_Boot/
|
**/_Boot/
|
||||||
**/_CompileInfo/
|
**/_CompileInfo/
|
||||||
#**/_Libraries/
|
**/_Libraries/
|
||||||
**/_ModuleInstall/
|
**/_ModuleInstall/
|
||||||
**/_Deployment/
|
**/_Deployment/
|
||||||
**/_Repository/
|
**/_Repository/
|
||||||
|
|||||||
@@ -1,24 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<TcSmProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2012/07/TcSmProject" TcSmVersion="1.0" TcVersion="3.1.4026.19">
|
<TcSmProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2012/07/TcSmProject" TcSmVersion="1.0" TcVersion="3.1.4026.16">
|
||||||
<DataTypes>
|
|
||||||
<DataType>
|
|
||||||
<Name GUID="{51F782DC-92E3-4391-9C7A-339EB87A42D8}" PersistentType="true">TestAlarms</Name>
|
|
||||||
<DisplayName TxtId=""><![CDATA[NewEventClass_DisplayText]]></DisplayName>
|
|
||||||
<EventId>
|
|
||||||
<Name Id="1">TestError</Name>
|
|
||||||
<DisplayName TxtId=""><![CDATA[Test Error ohne parameter]]></DisplayName>
|
|
||||||
<Severity>Error</Severity>
|
|
||||||
</EventId>
|
|
||||||
<EventId>
|
|
||||||
<Name Id="2">TestWarning</Name>
|
|
||||||
<DisplayName TxtId=""><![CDATA[Test Warning ohne Parameter]]></DisplayName>
|
|
||||||
<Severity>Warning</Severity>
|
|
||||||
</EventId>
|
|
||||||
<Hides>
|
|
||||||
<Hide GUID="{2C256031-B71B-4053-BBA0-1118C08EC292}"/>
|
|
||||||
</Hides>
|
|
||||||
</DataType>
|
|
||||||
</DataTypes>
|
|
||||||
<Project ProjectGUID="{775BE4FD-89CE-48D5-8E68-5C84AF95981A}" TargetNetId="5.167.199.178.1.1" Target64Bit="true" ShowHideConfigurations="#x6">
|
<Project ProjectGUID="{775BE4FD-89CE-48D5-8E68-5C84AF95981A}" TargetNetId="5.167.199.178.1.1" Target64Bit="true" ShowHideConfigurations="#x6">
|
||||||
<System>
|
<System>
|
||||||
<Settings MaxCpus="2"/>
|
<Settings MaxCpus="2"/>
|
||||||
@@ -28,264 +9,264 @@
|
|||||||
</Task>
|
</Task>
|
||||||
</Tasks>
|
</Tasks>
|
||||||
<TypeSystem>
|
<TypeSystem>
|
||||||
<AdditionalTmcFile Name="BaseComponents_Events" File="..\..\gasflow\BaseComponents_Events.tmc"/>
|
<AdditionalTmcFile Name="BaseComponents_Events" File="BaseComponents_Events.tmc"/>
|
||||||
</TypeSystem>
|
</TypeSystem>
|
||||||
</System>
|
</System>
|
||||||
<Plc>
|
<Plc>
|
||||||
<Project GUID="{4E62D9E7-436C-457D-8DC4-82D2FEF91C96}" Name="PLC" PrjFilePath="PLC\PLC.plcproj" TmcFilePath="PLC\PLC.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true">
|
<Project GUID="{4E62D9E7-436C-457D-8DC4-82D2FEF91C96}" Name="PLC" PrjFilePath="PLC\PLC.plcproj" TmcFilePath="PLC\PLC.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true">
|
||||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{367F99A2-7D94-70AB-79F0-621299EE7AC9}" TmcPath="PLC\PLC.tmc">
|
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{AC60CA8B-BF14-DCA6-B7D9-AA4A866C44DE}" TmcPath="PLC\PLC.tmc">
|
||||||
<Name>PLC Instance</Name>
|
<Name>PLC Instance</Name>
|
||||||
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
|
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
|
||||||
<Vars VarGrpType="1">
|
<Vars VarGrpType="1">
|
||||||
<Name>PlcTask Inputs</Name>
|
<Name>PlcTask Inputs</Name>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOn.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOn.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOn.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOn.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOn.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOn.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOn.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOn.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOn.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOn.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOn.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOn.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOn.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOn.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOn.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOn.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOn.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOn.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOn.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOn.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOn.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOn.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOn.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOn.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOn.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOn.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOn.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOn.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOn.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOn.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOn.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOn.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOn.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOn.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOn.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOn.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOn.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOn.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOn.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOn.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOn.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOn.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOn.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOn.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOn.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOn.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOn.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOn.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOff.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOff.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOff.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOff.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOff.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOff.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorLowOff.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorLowOff.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOff.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOff.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOff.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOff.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOff.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOff.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningLowOff.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningLowOff.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOff.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOff.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOff.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOff.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOff.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOff.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIWarningHighOff.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIWarningHighOff.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOff.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOff.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOff.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOff.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOff.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOff.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIErrorHighOff.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIErrorHighOff.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOff.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOff.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOff.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOff.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOff.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOff.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIUnderrangeOff.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIUnderrangeOff.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOff.iAnalogValue</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOff.iAnalogValue</Name>
|
||||||
<Comment><![CDATA[ Analog input value]]></Comment>
|
<Comment><![CDATA[ Analog input value]]></Comment>
|
||||||
<Type>INT</Type>
|
<Type>INT</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOff.xUnderrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOff.xUnderrange</Name>
|
||||||
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
<Comment><![CDATA[ Card has detected an open circuit]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOff.xOverrange</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOff.xOverrange</Name>
|
||||||
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
<Comment><![CDATA[ Input is overloaded]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
</Var>
|
</Var>
|
||||||
<Var>
|
<Var>
|
||||||
<Name>MAIN._fbAnalogInputTest._fbAIOverrangeOff.xErrorCard</Name>
|
<Name>PRG_MAIN._fbAnalogInputTest._fbAIOverrangeOff.xErrorCard</Name>
|
||||||
<Comment><![CDATA[ Input card has error
|
<Comment><![CDATA[ Input card has error
|
||||||
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
EL30xx also sets this if an underrange or overrange error is present]]></Comment>
|
||||||
<Type>BOOL</Type>
|
<Type>BOOL</Type>
|
||||||
@@ -308,10 +289,5 @@
|
|||||||
</Instance>
|
</Instance>
|
||||||
</Project>
|
</Project>
|
||||||
</Plc>
|
</Plc>
|
||||||
<Analytics ConfigVersion="1.4">
|
|
||||||
<Name>ANALYTICS</Name>
|
|
||||||
<ImageId>437</ImageId>
|
|
||||||
<XmlProps><![CDATA[<Address>Hauptstraße 5, 32567 Berlin</Address><Latitude>123.41</Latitude><Longitude>43.4555</Longitude><SystemIdAlias /><DeviceProps></DeviceProps><SelectedDriverVersion>Latest</SelectedDriverVersion><StreamTargets><StreamTargetItem Id="c77d2d3a-36af-40a8-bced-d69e6e281117"><Name>Boot Project Path</Name><Type>FILE</Type><Directory>%TC_BOOTPRJPATH%</Directory><MqttConnectionSettings><Broker>127.0.0.1</Broker><BrokerPort>1883</BrokerPort><UserID /><WithCertificates>false</WithCertificates><CA_Certificate /><Cert_Certificate /><Key_Certificate /><CommunicationTimeout>30000000</CommunicationTimeout><KeepAlivePeriod>600000000</KeepAlivePeriod><TcpBufferSize>32768</TcpBufferSize><SecurityType>NO_SECURITY</SecurityType><Insecure>false</Insecure><IgnoreExpiration>false</IgnoreExpiration><IsPskIdCaseSensitive>false</IsPskIdCaseSensitive><IgnoreCnMismatch>false</IgnoreCnMismatch><TargetPaths>false</TargetPaths><PskMode>HexKey</PskMode></MqttConnectionSettings><TimeType>None</TimeType></StreamTargetItem></StreamTargets><ActivateAlyLogger>false</ActivateAlyLogger>]]></XmlProps>
|
|
||||||
</Analytics>
|
|
||||||
</Project>
|
</Project>
|
||||||
</TcSmProject>
|
</TcSmProject>
|
||||||
2509
PLC/PLC.plcproj
Normal file
2509
PLC/PLC.plcproj
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,10 +17,10 @@ VAR_INPUT
|
|||||||
xErrorCard AT %I* : BOOL;
|
xErrorCard AT %I* : BOOL;
|
||||||
|
|
||||||
// IO config data
|
// IO config data
|
||||||
stAnalogIOConfig : REFERENCE TO ST_ANALOG_IO_CONFIG;
|
stAnalogIOConfig : ST_ANALOG_IO_CONFIG;
|
||||||
|
|
||||||
// Error and warning config data
|
// Error and warning config data
|
||||||
stAnalogEWConfig : REFERENCE TO ST_ANALOG_EW_CONFIG;
|
stAnalogEWConfig : ST_ANALOG_EW_CONFIG;
|
||||||
|
|
||||||
// Global switch to dissable all errors
|
// Global switch to dissable all errors
|
||||||
xReleaseErrors : BOOL := TRUE;
|
xReleaseErrors : BOOL := TRUE;
|
||||||
@@ -120,12 +120,21 @@ VAR
|
|||||||
// Clamped analog value
|
// Clamped analog value
|
||||||
_iClampedAnalogValue : INT;
|
_iClampedAnalogValue : INT;
|
||||||
|
|
||||||
|
// Internal scaled value
|
||||||
|
_rScaledValue : REAL;
|
||||||
|
|
||||||
// Name of the function block
|
// Name of the function block
|
||||||
_sName : STRING;
|
_sName : STRING;
|
||||||
|
|
||||||
//{attribute 'instance-path'}
|
// Internal warning flags
|
||||||
//{attribute 'noinit'}
|
_xWarningLow : BOOL;
|
||||||
//_sDebugName : STRING;
|
_xWarningHigh : BOOL;
|
||||||
|
_xWarning : BOOL;
|
||||||
|
|
||||||
|
// Internal error flag
|
||||||
|
_xErrorLow : BOOL;
|
||||||
|
_xErrorHigh : BOOL;
|
||||||
|
_xError : BOOL;
|
||||||
|
|
||||||
// Alarm handlers
|
// Alarm handlers
|
||||||
_fbAlarmCardError : FB_TcAlarm;
|
_fbAlarmCardError : FB_TcAlarm;
|
||||||
@@ -161,7 +170,7 @@ CheckEWLevels();
|
|||||||
|
|
||||||
IF xReleaseErrors AND (_xConfigError OR (_xEWConfigError AND xReleaseLimitErrors)) THEN
|
IF xReleaseErrors AND (_xConfigError OR (_xEWConfigError AND xReleaseLimitErrors)) THEN
|
||||||
// Latch error
|
// Latch error
|
||||||
xError := TRUE;
|
_xError := TRUE;
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
IF (NOT xInUnitTestMode) AND (NOT _fbAlarmConfigError.bRaised) THEN
|
IF (NOT xInUnitTestMode) AND (NOT _fbAlarmConfigError.bRaised) THEN
|
||||||
@@ -177,15 +186,6 @@ IF (NOT _xConfigError) AND (NOT _xEWConfigError) AND _fbAlarmConfigError.bRaised
|
|||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
|
|
||||||
// =============================================
|
|
||||||
// Abort if config parameter are not a valid ref
|
|
||||||
// =============================================
|
|
||||||
|
|
||||||
IF (NOT __ISVALIDREF(stAnalogIOConfig)) AND (NOT __ISVALIDREF(stAnalogEWConfig)) THEN
|
|
||||||
RETURN;
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
|
|
||||||
// ========================
|
// ========================
|
||||||
// Analog value calculation
|
// Analog value calculation
|
||||||
// ========================
|
// ========================
|
||||||
@@ -195,7 +195,7 @@ _iClampedAnalogValue := MAX(_iAIMin, iAnalogValue);
|
|||||||
_iClampedAnalogValue := MIN(_iAIMax, _iClampedAnalogValue);
|
_iClampedAnalogValue := MIN(_iAIMax, _iClampedAnalogValue);
|
||||||
|
|
||||||
// Calc scaled value
|
// Calc scaled value
|
||||||
rScaledValue := _iClampedAnalogValue * _rConversionFactor + _rBaseOffset;
|
_rScaledValue := _iClampedAnalogValue * _rConversionFactor + _rBaseOffset;
|
||||||
|
|
||||||
|
|
||||||
// =========================
|
// =========================
|
||||||
@@ -211,7 +211,7 @@ _fbSignalDelayUnderrangeError(
|
|||||||
|
|
||||||
// Latch error signal
|
// Latch error signal
|
||||||
IF _fbSignalDelayUnderrangeError.xReleaseSignal THEN
|
IF _fbSignalDelayUnderrangeError.xReleaseSignal THEN
|
||||||
xError := TRUE;
|
_xError := TRUE;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
@@ -243,7 +243,7 @@ _fbSignalDelayOverloadError(
|
|||||||
|
|
||||||
// Latch error signal
|
// Latch error signal
|
||||||
IF _fbSignalDelayOverloadError.xReleaseSignal THEN
|
IF _fbSignalDelayOverloadError.xReleaseSignal THEN
|
||||||
xError := TRUE;
|
_xError := TRUE;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
@@ -277,7 +277,7 @@ _fbSignalDelayCardError(
|
|||||||
|
|
||||||
// Latch error signal
|
// Latch error signal
|
||||||
IF _fbSignalDelayCardError.xReleaseSignal THEN
|
IF _fbSignalDelayCardError.xReleaseSignal THEN
|
||||||
xError := TRUE;
|
_xError := TRUE;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
@@ -301,16 +301,16 @@ END_IF
|
|||||||
// ===========================
|
// ===========================
|
||||||
|
|
||||||
_fbSignalDelayErrorHigh(
|
_fbSignalDelayErrorHigh(
|
||||||
xSignal:= (rScaledValue >= _rMaxErrorLevel),
|
xSignal:= (_rScaledValue >= _rMaxErrorLevel),
|
||||||
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
||||||
timOnDelay:= stAnalogEWConfig.stDelays.timErrorHighOn,
|
timOnDelay:= stAnalogEWConfig.stDelays.timErrorHighOn,
|
||||||
timOffDelay:= stAnalogEWConfig.stDelays.timErrorHighOff);
|
timOffDelay:= stAnalogEWConfig.stDelays.timErrorHighOff);
|
||||||
|
|
||||||
xErrorHigh := _fbSignalDelayErrorHigh.xReleaseSignal;
|
_xErrorHigh := _fbSignalDelayErrorHigh.xReleaseSignal;
|
||||||
|
|
||||||
// Latch error
|
// Latch error
|
||||||
IF xErrorLow THEN
|
IF _xErrorHigh THEN
|
||||||
xError := TRUE;
|
_xError := TRUE;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
@@ -334,16 +334,16 @@ END_IF
|
|||||||
// ===========================
|
// ===========================
|
||||||
|
|
||||||
_fbSignalDelayErrorLow(
|
_fbSignalDelayErrorLow(
|
||||||
xSignal:= (rScaledValue <= _rMinErrorLevel),
|
xSignal:= (_rScaledValue <= _rMinErrorLevel),
|
||||||
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
||||||
timOnDelay:= stAnalogEWConfig.stDelays.timErrorLowOn,
|
timOnDelay:= stAnalogEWConfig.stDelays.timErrorLowOn,
|
||||||
timOffDelay:= stAnalogEWConfig.stDelays.timErrorLowOff);
|
timOffDelay:= stAnalogEWConfig.stDelays.timErrorLowOff);
|
||||||
|
|
||||||
xErrorLow := _fbSignalDelayErrorLow.xReleaseSignal;
|
_xErrorLow := _fbSignalDelayErrorLow.xReleaseSignal;
|
||||||
|
|
||||||
// Latch error
|
// Latch error
|
||||||
IF xErrorLow THEN
|
IF _xErrorLow THEN
|
||||||
xError := TRUE;
|
_xError := TRUE;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
@@ -367,12 +367,12 @@ END_IF
|
|||||||
// ===========================
|
// ===========================
|
||||||
|
|
||||||
_fbSignalDelayWarningHigh(
|
_fbSignalDelayWarningHigh(
|
||||||
xSignal:= (rScaledValue >= _rMaxWarningLevel),
|
xSignal:= (_rScaledValue >= _rMaxWarningLevel),
|
||||||
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
||||||
timOnDelay:= stAnalogEWConfig.stDelays.timWarningHighOn,
|
timOnDelay:= stAnalogEWConfig.stDelays.timWarningHighOn,
|
||||||
timOffDelay:= stAnalogEWConfig.stDelays.timWarningHighOff);
|
timOffDelay:= stAnalogEWConfig.stDelays.timWarningHighOff);
|
||||||
|
|
||||||
xWarningHigh := _fbSignalDelayWarningHigh.xReleaseSignal;
|
_xWarningHigh := _fbSignalDelayWarningHigh.xReleaseSignal;
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
IF _fbSignalDelayWarningHigh.xReleaseSignal AND (NOT xInUnitTestMode) AND (NOT _fbAlarmWarningHigh.bRaised) THEN
|
IF _fbSignalDelayWarningHigh.xReleaseSignal AND (NOT xInUnitTestMode) AND (NOT _fbAlarmWarningHigh.bRaised) THEN
|
||||||
@@ -395,12 +395,12 @@ END_IF
|
|||||||
// ===========================
|
// ===========================
|
||||||
|
|
||||||
_fbSignalDelayWarningLow(
|
_fbSignalDelayWarningLow(
|
||||||
xSignal:= (rScaledValue <= _rMinWarningLevel),
|
xSignal:= (_rScaledValue <= _rMinWarningLevel),
|
||||||
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
xRelease:= stAnalogIOConfig.xUsed AND xReleaseErrors AND xReleaseLimitErrors AND (NOT _xEWConfigError),
|
||||||
timOnDelay:= stAnalogEWConfig.stDelays.timWarningLowOn,
|
timOnDelay:= stAnalogEWConfig.stDelays.timWarningLowOn,
|
||||||
timOffDelay:= stAnalogEWConfig.stDelays.timWarningLowOff);
|
timOffDelay:= stAnalogEWConfig.stDelays.timWarningLowOff);
|
||||||
|
|
||||||
xWarningLow := _fbSignalDelayWarningLow.xReleaseSignal;
|
_xWarningLow := _fbSignalDelayWarningLow.xReleaseSignal;
|
||||||
|
|
||||||
// Raise alarm
|
// Raise alarm
|
||||||
IF _fbSignalDelayWarningLow.xReleaseSignal AND (NOT xInUnitTestMode) AND (NOT _fbAlarmWarningLow.bRaised) THEN
|
IF _fbSignalDelayWarningLow.xReleaseSignal AND (NOT xInUnitTestMode) AND (NOT _fbAlarmWarningLow.bRaised) THEN
|
||||||
@@ -422,7 +422,7 @@ END_IF
|
|||||||
// Warning flag
|
// Warning flag
|
||||||
// ============
|
// ============
|
||||||
|
|
||||||
xWarning := xWarningLow OR xWarningHigh;
|
_xWarning := _xWarningLow OR _xWarningHigh;
|
||||||
|
|
||||||
|
|
||||||
// ================
|
// ================
|
||||||
@@ -440,9 +440,20 @@ _xInputErrorsActive := _fbSignalDelayUnderrangeError.xReleaseSignal
|
|||||||
OR _fbSignalDelayOverloadError.xReleaseSignal
|
OR _fbSignalDelayOverloadError.xReleaseSignal
|
||||||
OR _fbSignalDelayCardError.xReleaseSignal;
|
OR _fbSignalDelayCardError.xReleaseSignal;
|
||||||
|
|
||||||
IF xConfirmAlarms AND xError AND (NOT _xAlarmsActive) AND (NOT _xInputErrorsActive) AND (NOT _xConfigError) THEN
|
IF xConfirmAlarms AND _xError AND (NOT _xAlarmsActive) AND (NOT _xInputErrorsActive) AND (NOT _xConfigError) THEN
|
||||||
xError := FALSE;
|
_xError := FALSE;
|
||||||
END_IF]]></ST>
|
END_IF
|
||||||
|
|
||||||
|
// Copy internal signals to outputs
|
||||||
|
xWarningLow := _xWarningLow;
|
||||||
|
xWarningHigh := _xWarningHigh;
|
||||||
|
xWarning := _xWarning;
|
||||||
|
|
||||||
|
xErrorLow := _xErrorLow;
|
||||||
|
xErrorHigh := _xErrorHigh;
|
||||||
|
xError := _xError;
|
||||||
|
|
||||||
|
rScaledValue := _rScaledValue;]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
<Method Name="CalcScalingFactors" Id="{e88dfbcd-1a0d-45a0-9d50-5ad8be2479c9}">
|
<Method Name="CalcScalingFactors" Id="{e88dfbcd-1a0d-45a0-9d50-5ad8be2479c9}">
|
||||||
<Declaration><![CDATA[{attribute 'analysis' := '-56'}
|
<Declaration><![CDATA[{attribute 'analysis' := '-56'}
|
||||||
@@ -453,13 +464,7 @@ VAR
|
|||||||
END_VAR
|
END_VAR
|
||||||
]]></Declaration>
|
]]></Declaration>
|
||||||
<Implementation>
|
<Implementation>
|
||||||
<ST><![CDATA[// Check for valid config ref
|
<ST><![CDATA[// _lrConversionFactor := (lrPVMax - lrPVMin)/(udiAIMax - udiAIMin) + (rPVMin - ((lrPVMax - lrPVMin)/(udiAIMax - udiAIMin)*udiAIMin))
|
||||||
IF (NOT __ISVALIDREF(stAnalogIOConfig)) THEN
|
|
||||||
_xConfigError := TRUE;
|
|
||||||
RETURN;
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
// _lrConversionFactor := (lrPVMax - lrPVMin)/(udiAIMax - udiAIMin) + (rPVMin - ((lrPVMax - lrPVMin)/(udiAIMax - udiAIMin)*udiAIMin))
|
|
||||||
// Splitted in two calculations to catch division by zero
|
// Splitted in two calculations to catch division by zero
|
||||||
_rNum := (stAnalogIOConfig.rPVMax - stAnalogIOConfig.rPVMin);
|
_rNum := (stAnalogIOConfig.rPVMax - stAnalogIOConfig.rPVMin);
|
||||||
_rDenom := INT_TO_REAL(stAnalogIOConfig.iAIMax - stAnalogIOConfig.iAIMin);
|
_rDenom := INT_TO_REAL(stAnalogIOConfig.iAIMax - stAnalogIOConfig.iAIMin);
|
||||||
@@ -489,13 +494,7 @@ VAR
|
|||||||
END_VAR
|
END_VAR
|
||||||
]]></Declaration>
|
]]></Declaration>
|
||||||
<Implementation>
|
<Implementation>
|
||||||
<ST><![CDATA[// Check for valid config ref
|
<ST><![CDATA[// Reset (E)rror (W)arning config error
|
||||||
IF (NOT __ISVALIDREF(stAnalogEWConfig)) THEN
|
|
||||||
_xEWConfigError := TRUE;
|
|
||||||
RETURN;
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
// Reset (E)rror (W)arning config error
|
|
||||||
_xEWConfigError := FALSE;
|
_xEWConfigError := FALSE;
|
||||||
|
|
||||||
// Check for EW config error
|
// Check for EW config error
|
||||||
@@ -522,7 +521,7 @@ IF (NOT _xEWConfigError) THEN
|
|||||||
OR (_rMaxWarningLevel <> stAnalogEWConfig.stLevels.rWarningMax)
|
OR (_rMaxWarningLevel <> stAnalogEWConfig.stLevels.rWarningMax)
|
||||||
OR (_rMaxErrorLevel <> stAnalogEWConfig.stLevels.rErrorMax) THEN
|
OR (_rMaxErrorLevel <> stAnalogEWConfig.stLevels.rErrorMax) THEN
|
||||||
{analysis +54}
|
{analysis +54}
|
||||||
//CreateAlarmLimitsMSG();
|
CreateAlarmLimitsMSG();
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
// Set new values
|
// Set new values
|
||||||
@@ -548,12 +547,7 @@ VAR
|
|||||||
END_VAR
|
END_VAR
|
||||||
]]></Declaration>
|
]]></Declaration>
|
||||||
<Implementation>
|
<Implementation>
|
||||||
<ST><![CDATA[// Check for valid ref
|
<ST><![CDATA[// Check if analog value has unit
|
||||||
IF (NOT __ISVALIDREF(stAnalogEWConfig)) THEN
|
|
||||||
RETURN;
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
// Check if analog value has unit
|
|
||||||
IF stAnalogIOConfig.sUnit <> '' THEN
|
IF stAnalogIOConfig.sUnit <> '' THEN
|
||||||
_sTempUnit := CONCAT(' ', stAnalogIOConfig.sUnit);
|
_sTempUnit := CONCAT(' ', stAnalogIOConfig.sUnit);
|
||||||
ELSE
|
ELSE
|
||||||
@@ -566,11 +560,13 @@ _sTempWarningMin := CONCAT(REAL_TO_STRING(stAnalogEWConfig.stLevels.rWarningMin)
|
|||||||
_sTempWarningMax := CONCAT(REAL_TO_STRING(stAnalogEWConfig.stLevels.rWarningMax), _sTempUnit);
|
_sTempWarningMax := CONCAT(REAL_TO_STRING(stAnalogEWConfig.stLevels.rWarningMax), _sTempUnit);
|
||||||
_sTempErrorMax := CONCAT(REAL_TO_STRING(stAnalogEWConfig.stLevels.rErrorMax), _sTempUnit);
|
_sTempErrorMax := CONCAT(REAL_TO_STRING(stAnalogEWConfig.stLevels.rErrorMax), _sTempUnit);
|
||||||
|
|
||||||
|
{analysis -46}
|
||||||
// Inser message parameters
|
// Inser message parameters
|
||||||
_fbAlarmErrorLow.ipArguments.Clear().AddString(_sName).AddString(_sTempErrorMin);
|
_fbAlarmErrorLow.ipArguments.Clear().AddString(_sName).AddString(_sTempErrorMin);
|
||||||
_fbAlarmWarningLow.ipArguments.Clear().AddString(_sName).AddString(_sTempWarningMin);
|
_fbAlarmWarningLow.ipArguments.Clear().AddString(_sName).AddString(_sTempWarningMin);
|
||||||
_fbAlarmWarningHigh.ipArguments.Clear().AddString(_sName).AddString(_sTempWarningMax);
|
_fbAlarmWarningHigh.ipArguments.Clear().AddString(_sName).AddString(_sTempWarningMax);
|
||||||
_fbAlarmErrorHigh.ipArguments.Clear().AddString(_sName).AddString(_sTempErrorMax);]]></ST>
|
_fbAlarmErrorHigh.ipArguments.Clear().AddString(_sName).AddString(_sTempErrorMax);
|
||||||
|
{analysis +46}]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</Method>
|
||||||
<Method Name="CreateAlarmMSG" Id="{e4d0fc74-1711-410b-9ec3-4af08afbc236}">
|
<Method Name="CreateAlarmMSG" Id="{e4d0fc74-1711-410b-9ec3-4af08afbc236}">
|
||||||
@@ -579,10 +575,12 @@ VAR_INPUT
|
|||||||
END_VAR
|
END_VAR
|
||||||
]]></Declaration>
|
]]></Declaration>
|
||||||
<Implementation>
|
<Implementation>
|
||||||
<ST><![CDATA[_fbAlarmCardError.ipArguments.Clear().AddString(_sName);
|
<ST><![CDATA[{analysis -46}
|
||||||
|
_fbAlarmCardError.ipArguments.Clear().AddString(_sName);
|
||||||
_fbAlarmUnderrange.ipArguments.Clear().AddString(_sName);
|
_fbAlarmUnderrange.ipArguments.Clear().AddString(_sName);
|
||||||
_fbAlarmOverload.ipArguments.Clear().AddString(_sName);
|
_fbAlarmOverload.ipArguments.Clear().AddString(_sName);
|
||||||
_fbAlarmConfigError.ipArguments.Clear().AddString(_sName);]]></ST>
|
_fbAlarmConfigError.ipArguments.Clear().AddString(_sName);
|
||||||
|
{analysis +46}]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</Method>
|
||||||
<Method Name="FB_init" Id="{27512538-cc2f-4100-8046-022de49f067a}">
|
<Method Name="FB_init" Id="{27512538-cc2f-4100-8046-022de49f067a}">
|
||||||
334
PLC/POUs/EventListener/FB_EventListener.TcPOU
Normal file
334
PLC/POUs/EventListener/FB_EventListener.TcPOU
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1">
|
||||||
|
<POU Name="FB_EventListener" Id="{f2b95750-ccda-4cd6-a03a-c64e3d2c4751}" SpecialFunc="None">
|
||||||
|
<Declaration><![CDATA[{attribute 'no_assign'}
|
||||||
|
FUNCTION_BLOCK FB_EventListener EXTENDS FB_ListenerBase2
|
||||||
|
VAR_INPUT
|
||||||
|
|
||||||
|
END_VAR
|
||||||
|
VAR_OUTPUT
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
_fbEventLogger : FB_TcEventLogger;
|
||||||
|
|
||||||
|
_fbEventFilter : FB_TcEventFilter;
|
||||||
|
|
||||||
|
_fbMqttClient : FB_IotMqtt5Client;
|
||||||
|
|
||||||
|
_fbBuffer : FB_MemRingBuffer;
|
||||||
|
_abAlarmBuffer : ARRAY[0..1000] OF BYTE;
|
||||||
|
|
||||||
|
_fbJson : FB_JsonSaxWriter;
|
||||||
|
|
||||||
|
_sTopic : STRING(255);
|
||||||
|
_stBufferEventEntryToBuffer : ST_BufferEventEntry;
|
||||||
|
_stBufferEventEntryFromBuffer : ST_BufferEventEntry;
|
||||||
|
|
||||||
|
{attribute 'TcEncoding':='UTF-8'}
|
||||||
|
_sLastMessageText : STRING;
|
||||||
|
|
||||||
|
_udiCurrentEntries : UDINT;
|
||||||
|
|
||||||
|
_uiState : UINT := 0;
|
||||||
|
|
||||||
|
// Result from read buffer head
|
||||||
|
_xSuccess : BOOL;
|
||||||
|
|
||||||
|
// Results from read event message
|
||||||
|
_xGetTextDone : BOOL;
|
||||||
|
_xGetTextError : BOOL;
|
||||||
|
|
||||||
|
// Internal signal to connect to mqtt broker
|
||||||
|
_xConnect : BOOL := TRUE;
|
||||||
|
END_VAR
|
||||||
|
]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[// Needs to be called to get alarms and events
|
||||||
|
SUPER^.Execute();
|
||||||
|
|
||||||
|
// Call mqtt client
|
||||||
|
_fbMqttClient.Execute(bConnect := _xConnect);
|
||||||
|
|
||||||
|
// Check if we have alarms to send
|
||||||
|
IF _udiCurrentEntries > 0 THEN
|
||||||
|
{analysis -19}
|
||||||
|
_fbBuffer.A_RemoveHead(pRead:= ADR(_stBufferEventEntryFromBuffer),
|
||||||
|
cbRead:= SIZEOF(_stBufferEventEntryFromBuffer),
|
||||||
|
pBuffer:= ADR(_abAlarmBuffer),
|
||||||
|
cbBuffer:= SIZEOF(_abAlarmBuffer),
|
||||||
|
bOk=> _xSuccess,
|
||||||
|
nCount => _udiCurrentEntries);
|
||||||
|
{analysis +19}
|
||||||
|
IF _xSuccess THEN
|
||||||
|
_uiState := 10;
|
||||||
|
END_IF
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
CASE _uiState OF
|
||||||
|
0: // Idle
|
||||||
|
|
||||||
|
10: // Get alarm text
|
||||||
|
_xGetTextDone := _stBufferEventEntryFromBuffer.fbAlarm.RequestEventText(
|
||||||
|
nLangId := 1033,
|
||||||
|
sResult := _sLastMessageText,
|
||||||
|
nResultSize := SIZEOF(_sLastMessageText),
|
||||||
|
bError => _xGetTextError);
|
||||||
|
|
||||||
|
IF _xGetTextError THEN
|
||||||
|
_sLastMessageText := '';
|
||||||
|
_uiState := 20;
|
||||||
|
ELSIF _xGetTextDone THEN
|
||||||
|
_uiState := 20;
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
20: // Create mqtt message
|
||||||
|
CreateMessage();
|
||||||
|
_uiState := 0;
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
// Do nothing
|
||||||
|
;
|
||||||
|
END_CASE]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
<Method Name="AddAlarmToQueue" Id="{21a4a6af-4b8a-455f-b344-9cb0224cbfab}">
|
||||||
|
<Declaration><![CDATA[METHOD PRIVATE AddAlarmToQueue : BOOL
|
||||||
|
VAR_INPUT
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
_xOk : BOOL;
|
||||||
|
END_VAR
|
||||||
|
]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[{analysis -19}
|
||||||
|
_fbBuffer.A_AddTail( pWrite:= ADR( _stBufferEventEntryToBuffer ),
|
||||||
|
cbWrite:= SIZEOF( _stBufferEventEntryToBuffer ),
|
||||||
|
pBuffer:= ADR( _abAlarmBuffer ),
|
||||||
|
cbBuffer:= SIZEOF( _abAlarmBuffer ),
|
||||||
|
bOk=> _xOk,
|
||||||
|
nCount => _udiCurrentEntries);
|
||||||
|
{analysis +19}
|
||||||
|
|
||||||
|
AddAlarmToQueue := _xOk;
|
||||||
|
]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
<Method Name="CreateMessage" Id="{d6f40ec8-01e1-47a8-a5b0-10322e1b0d10}">
|
||||||
|
<Declaration><![CDATA[METHOD PRIVATE CreateMessage
|
||||||
|
VAR_INPUT
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
_sTemp : STRING;
|
||||||
|
_sJsonDocument : STRING(255);
|
||||||
|
_fbArguments : I_TcArguments;
|
||||||
|
END_VAR
|
||||||
|
]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[_fbJson.ResetDocument();
|
||||||
|
_fbJson.StartObject();
|
||||||
|
|
||||||
|
// id todo test hashing
|
||||||
|
_fbJson.AddKey('id');
|
||||||
|
_fbJson.AddUdint(_stBufferEventEntryFromBuffer.fbAlarm.nUniqueId);
|
||||||
|
|
||||||
|
// Skip parent
|
||||||
|
|
||||||
|
// ack
|
||||||
|
_fbJson.AddKey('ack');
|
||||||
|
CASE _stBufferEventEntryFromBuffer.fbAlarm.eConfirmationState OF
|
||||||
|
TcEventConfirmationState.WaitForConfirmation:
|
||||||
|
_fbJson.AddUdint(1);
|
||||||
|
|
||||||
|
TcEventConfirmationState.Confirmed:
|
||||||
|
_fbJson.AddUdint(2);
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
_fbJson.AddUdint(0);
|
||||||
|
END_CASE
|
||||||
|
|
||||||
|
|
||||||
|
// state
|
||||||
|
_fbJson.AddKey('state');
|
||||||
|
IF _stBufferEventEntryFromBuffer.fbAlarm.bActive THEN
|
||||||
|
_fbJson.AddUdint(1);
|
||||||
|
ELSE
|
||||||
|
_fbJson.AddUdint(0);
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
|
||||||
|
// t0
|
||||||
|
_fbJson.AddKey('t0');
|
||||||
|
// In case of a reraise this will be updated!!!
|
||||||
|
_fbJson.AddUlint(_stBufferEventEntryFromBuffer.fbAlarm.nTimeRaised);
|
||||||
|
|
||||||
|
|
||||||
|
// t1
|
||||||
|
_fbJson.AddKey('t1');
|
||||||
|
|
||||||
|
CASE _stBufferEventEntryFromBuffer.eEventType OF
|
||||||
|
E_EventType.RAISED:
|
||||||
|
_fbJson.AddUlint(_stBufferEventEntryFromBuffer.fbAlarm.nTimeRaised);
|
||||||
|
|
||||||
|
E_EventType.CLEARED:
|
||||||
|
_fbJson.AddUlint(_stBufferEventEntryFromBuffer.fbAlarm.nTimeCleared);
|
||||||
|
|
||||||
|
E_EventType.CONFIRMED:
|
||||||
|
_fbJson.AddUlint(_stBufferEventEntryFromBuffer.fbAlarm.nTimeConfirmed);
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
_fbJson.AddUlint(0);
|
||||||
|
END_CASE
|
||||||
|
|
||||||
|
|
||||||
|
// Skipp access rights
|
||||||
|
|
||||||
|
// Skipp origin id use origin name instead
|
||||||
|
|
||||||
|
// origin
|
||||||
|
_fbJson.AddKey('origin');
|
||||||
|
{analysis -46}
|
||||||
|
_sTemp := _stBufferEventEntryFromBuffer.fbAlarm.ipSourceInfo.sName;
|
||||||
|
{analysis +46}
|
||||||
|
_fbJson.AddString(_sTemp);
|
||||||
|
|
||||||
|
// Skipp message id because there is no catalogue
|
||||||
|
|
||||||
|
// msg
|
||||||
|
_fbJson.AddKey('msg');
|
||||||
|
_fbJson.AddString(_sLastMessageText);
|
||||||
|
|
||||||
|
// s
|
||||||
|
_fbJson.AddKey('s');
|
||||||
|
CASE _stBufferEventEntryFromBuffer.fbAlarm.eSeverity OF
|
||||||
|
TcEventSeverity.Info:
|
||||||
|
_fbJson.AddUdint(96);
|
||||||
|
|
||||||
|
TcEventSeverity.Warning:
|
||||||
|
_fbJson.AddUdint(160);
|
||||||
|
|
||||||
|
TcEventSeverity.Error:
|
||||||
|
_fbJson.AddUdint(224);
|
||||||
|
|
||||||
|
TcEventSeverity.Critical:
|
||||||
|
_fbJson.AddUdint(255);
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
_fbJson.AddUdint(32);
|
||||||
|
END_CASE
|
||||||
|
|
||||||
|
// Skip message parameters
|
||||||
|
|
||||||
|
_fbArguments := _stBufferEventEntryFromBuffer.fbAlarm.ipArguments;
|
||||||
|
_fbJson.EndObject();
|
||||||
|
{analysis -26}
|
||||||
|
_fbJson.CopyDocument(_sJsonDocument, SIZEOF(_sJsonDocument));
|
||||||
|
{analysis +26}
|
||||||
|
|
||||||
|
// Send topic
|
||||||
|
_fbMqttClient.Publish(
|
||||||
|
sTopic:= 'SlmMachine/Notifications/NAMESPACE/Detail',
|
||||||
|
pPayload:= ADR(_sTemp),
|
||||||
|
nPayloadSize:= LEN2(ADR(_sTemp))+1,
|
||||||
|
eQoS:= TcIotMqttQos.AtLeastOnceDelivery,
|
||||||
|
bRetain:= FALSE,
|
||||||
|
bQueue:= FALSE);]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
<Method Name="FB_Init" Id="{a946d52f-a0e6-4aac-9d4c-5dd8aba5f5d2}">
|
||||||
|
<Declaration><![CDATA[//FB_Init is always available implicitly and it is used primarily for initialization.
|
||||||
|
//The return value is not evaluated. For a specific influence, you can also declare the
|
||||||
|
//methods explicitly and provide additional code there with the standard initialization
|
||||||
|
//code. You can evaluate the return value.
|
||||||
|
METHOD FB_Init: BOOL
|
||||||
|
VAR_INPUT
|
||||||
|
bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold)
|
||||||
|
bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change)
|
||||||
|
|
||||||
|
sHostName : STRING := 'localhost';
|
||||||
|
uiHostPort : UINT := 1883;
|
||||||
|
sTopic : STRING(255);
|
||||||
|
END_VAR]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[// Register alarms and messages
|
||||||
|
_fbEventFilter.Clear().IsAlarm().OR_OP().IsMessage();
|
||||||
|
Subscribe2(ipEventFilter := _fbEventFilter);
|
||||||
|
|
||||||
|
// Setup mqtt client parameters
|
||||||
|
_fbMqttClient.sHostName := sHostName;
|
||||||
|
_fbMqttClient.nHostPort := uiHostPort;
|
||||||
|
_sTopic := sTopic;
|
||||||
|
|
||||||
|
// Reset buffer
|
||||||
|
_fbBuffer.A_Reset();]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
<Method Name="OnAlarmCleared" Id="{00aefa2e-a70c-4880-b7a7-760d0051e0ee}">
|
||||||
|
<Declaration><![CDATA[METHOD OnAlarmCleared : Tc3_EventLogger.HRESULT
|
||||||
|
VAR_INPUT
|
||||||
|
{attribute 'naming' := 'off'}
|
||||||
|
fbEvent : REFERENCE TO Tc3_EventLogger.FB_TcEvent;
|
||||||
|
{attribute 'naming' := 'on'}
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
_xSuccess : BOOL;
|
||||||
|
END_VAR]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[IF __ISVALIDREF(fbEvent) THEN
|
||||||
|
_fbEventLogger.GetAlarmEx(stEventEntry := fbEvent.stEventEntry, ipSourceInfo := fbEvent.ipSourceInfo, fbAlarm := _stBufferEventEntryToBuffer.fbAlarm);
|
||||||
|
_stBufferEventEntryToBuffer.eEventType := E_EventType.CLEARED;
|
||||||
|
_xSuccess := AddAlarmToQueue();
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
<Method Name="OnAlarmConfirmed" Id="{4f33c838-6809-4051-9524-d88e2cf6713c}">
|
||||||
|
<Declaration><![CDATA[METHOD OnAlarmConfirmed : Tc3_EventLogger.HRESULT
|
||||||
|
VAR_INPUT
|
||||||
|
{attribute 'naming' := 'off'}
|
||||||
|
fbEvent : REFERENCE TO Tc3_EventLogger.FB_TcEvent;
|
||||||
|
{attribute 'naming' := 'on'}
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
_xSuccess : BOOL;
|
||||||
|
END_VAR]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[IF __ISVALIDREF(fbEvent) THEN
|
||||||
|
_fbEventLogger.GetAlarmEx(stEventEntry := fbEvent.stEventEntry, ipSourceInfo := fbEvent.ipSourceInfo, fbAlarm := _stBufferEventEntryToBuffer.fbAlarm);
|
||||||
|
_stBufferEventEntryToBuffer.eEventType := E_EventType.CONFIRMED;
|
||||||
|
_xSuccess := AddAlarmToQueue();
|
||||||
|
END_IF]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
<Method Name="OnAlarmRaised" Id="{2454a94e-91c5-4b90-9762-eaee63119c3b}">
|
||||||
|
<Declaration><![CDATA[METHOD OnAlarmRaised : Tc3_EventLogger.HRESULT
|
||||||
|
VAR_INPUT
|
||||||
|
{attribute 'naming' := 'off'}
|
||||||
|
fbEvent : REFERENCE TO Tc3_EventLogger.FB_TcEvent;
|
||||||
|
{attribute 'naming' := 'on'}
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
_xSuccess : BOOL;
|
||||||
|
END_VAR]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[IF __ISVALIDREF(fbEvent) THEN
|
||||||
|
_fbEventLogger.GetAlarmEx(stEventEntry := fbEvent.stEventEntry, ipSourceInfo := fbEvent.ipSourceInfo, fbAlarm := _stBufferEventEntryToBuffer.fbAlarm);
|
||||||
|
_stBufferEventEntryToBuffer.eEventType := E_EventType.RAISED;
|
||||||
|
_xSuccess := AddAlarmToQueue();
|
||||||
|
END_IF
|
||||||
|
]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
<Method Name="OnMessageSent" Id="{13d5d489-4166-4664-bd09-265b3b8bc14f}">
|
||||||
|
<Declaration><![CDATA[METHOD OnMessageSent : Tc3_EventLogger.HRESULT
|
||||||
|
VAR_INPUT
|
||||||
|
{attribute 'naming' := 'off'}
|
||||||
|
fbEvent : REFERENCE TO Tc3_EventLogger.FB_TcEvent;
|
||||||
|
{attribute 'naming' := 'on'}
|
||||||
|
END_VAR
|
||||||
|
]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</Method>
|
||||||
|
</POU>
|
||||||
|
</TcPlcObject>
|
||||||
17
PLC/POUs/EventListener/Types/E_EventType.TcDUT
Normal file
17
PLC/POUs/EventListener/Types/E_EventType.TcDUT
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1">
|
||||||
|
<DUT Name="E_EventType" Id="{c41c8e8d-56af-4514-8482-2c521e403b96}">
|
||||||
|
<Declaration><![CDATA[{attribute 'qualified_only'}
|
||||||
|
{attribute 'strict'}
|
||||||
|
{attribute 'to_string'}
|
||||||
|
TYPE E_EventType :
|
||||||
|
(
|
||||||
|
RAISED := 0,
|
||||||
|
CLEARED,
|
||||||
|
CONFIRMED,
|
||||||
|
MESSAGE
|
||||||
|
);
|
||||||
|
END_TYPE
|
||||||
|
]]></Declaration>
|
||||||
|
</DUT>
|
||||||
|
</TcPlcObject>
|
||||||
12
PLC/POUs/EventListener/Types/ST_BufferEventEntry.TcDUT
Normal file
12
PLC/POUs/EventListener/Types/ST_BufferEventEntry.TcDUT
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1">
|
||||||
|
<DUT Name="ST_BufferEventEntry" Id="{95daccce-6c97-4afa-b8a3-fb60fb3847c5}">
|
||||||
|
<Declaration><![CDATA[TYPE ST_BufferEventEntry :
|
||||||
|
STRUCT
|
||||||
|
fbAlarm : FB_TcAlarm;
|
||||||
|
eEventType : E_EventType;
|
||||||
|
END_STRUCT
|
||||||
|
END_TYPE
|
||||||
|
]]></Declaration>
|
||||||
|
</DUT>
|
||||||
|
</TcPlcObject>
|
||||||
17
PLC/POUs/PRG_MAIN.TcPOU
Normal file
17
PLC/POUs/PRG_MAIN.TcPOU
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1">
|
||||||
|
<POU Name="PRG_MAIN" Id="{f325d0cd-99c8-4d5b-980f-1fc96ab1417c}" SpecialFunc="None">
|
||||||
|
<Declaration><![CDATA[PROGRAM PRG_MAIN
|
||||||
|
VAR
|
||||||
|
{attribute 'analysis' := '-33'}
|
||||||
|
// Analog I/O tests
|
||||||
|
_fbAnalogInputTest : FB_AnalogInputTest;
|
||||||
|
|
||||||
|
_fbEventlistener : FB_EventListener(sHostName := '127.0.0.1', uiHostPort := 1883, sTopic := 'SlmMachine/Notifications/PLC/Detail');
|
||||||
|
END_VAR
|
||||||
|
]]></Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[TcUnit.RUN();]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</POU>
|
||||||
|
</TcPlcObject>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<CycleTime>10000</CycleTime>
|
<CycleTime>10000</CycleTime>
|
||||||
<Priority>20</Priority>
|
<Priority>20</Priority>
|
||||||
<PouCall>
|
<PouCall>
|
||||||
<Name>MAIN</Name>
|
<Name>PRG_MAIN</Name>
|
||||||
</PouCall>
|
</PouCall>
|
||||||
<TaskFBGuid>{a83be5e0-d5cf-4aec-b38e-29e42c090d19}</TaskFBGuid>
|
<TaskFBGuid>{a83be5e0-d5cf-4aec-b38e-29e42c090d19}</TaskFBGuid>
|
||||||
<Fb_init>{4deed5d2-49a0-440e-8d82-d09251814781}</Fb_init>
|
<Fb_init>{4deed5d2-49a0-440e-8d82-d09251814781}</Fb_init>
|
||||||
@@ -1,184 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<FileVersion>1.0.0.0</FileVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{4e62d9e7-436c-457d-8dc4-82d2fef91c96}</ProjectGuid>
|
|
||||||
<SubObjectsSortedByName>true</SubObjectsSortedByName>
|
|
||||||
<DownloadApplicationInfo>true</DownloadApplicationInfo>
|
|
||||||
<WriteProductVersion>false</WriteProductVersion>
|
|
||||||
<GenerateTpy>false</GenerateTpy>
|
|
||||||
<Name>PLC</Name>
|
|
||||||
<ProgramVersion>3.1.4026.19</ProgramVersion>
|
|
||||||
<Application>{7cc9c530-510c-48e6-a294-2e6b5e6fa820}</Application>
|
|
||||||
<TypeSystem>{951d7a0c-817c-4013-8204-ecd29ee0162e}</TypeSystem>
|
|
||||||
<Implicit_Task_Info>{e6d3915d-876b-4120-9e42-92be330ed750}</Implicit_Task_Info>
|
|
||||||
<Implicit_KindOfTask>{86bdbf68-2971-41b8-9b27-17e052a7f55d}</Implicit_KindOfTask>
|
|
||||||
<Implicit_Jitter_Distribution>{173a046e-fc1b-4ea3-9ec8-0d52397c403c}</Implicit_Jitter_Distribution>
|
|
||||||
<LibraryReferences>{c870d3c5-a637-481e-9586-ab8eaa6f8f36}</LibraryReferences>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="PlcTask.TcTTO">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Analog\FB_AnalogInput.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Analog\FB_AnalogOutput.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Analog\Types\ST_ANALOG_EW_CONFIG.TcDUT">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Analog\Types\ST_ANALOG_EW_DELAYS.TcDUT">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Analog\Types\ST_ANALOG_EW_LEVELS.TcDUT">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Analog\Types\ST_ANALOG_IO_CONFIG.TcDUT">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\MAIN.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Tests\FB_Machine.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Tests\MAIN_TESTS.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Unittests\AITests\FB_AnalogInputTest.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="POUs\Utilities\FB_ReleaseSignal.TcPOU">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="DUTs" />
|
|
||||||
<Folder Include="GVLs" />
|
|
||||||
<Folder Include="POUs\Analog" />
|
|
||||||
<Folder Include="POUs\Analog\Types" />
|
|
||||||
<Folder Include="POUs\Unittests" />
|
|
||||||
<Folder Include="POUs\Unittests\AITests" />
|
|
||||||
<Folder Include="POUs\Utilities" />
|
|
||||||
<Folder Include="POUs\Tests">
|
|
||||||
<ExcludeFromBuild>true</ExcludeFromBuild>
|
|
||||||
</Folder>
|
|
||||||
<Folder Include="VISUs" />
|
|
||||||
<Folder Include="POUs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PlaceholderReference Include="Tc2_Standard">
|
|
||||||
<DefaultResolution>Tc2_Standard, * (Beckhoff Automation GmbH)</DefaultResolution>
|
|
||||||
<Namespace>Tc2_Standard</Namespace>
|
|
||||||
</PlaceholderReference>
|
|
||||||
<PlaceholderReference Include="Tc2_System">
|
|
||||||
<DefaultResolution>Tc2_System, * (Beckhoff Automation GmbH)</DefaultResolution>
|
|
||||||
<Namespace>Tc2_System</Namespace>
|
|
||||||
</PlaceholderReference>
|
|
||||||
<PlaceholderReference Include="Tc3_EventLogger">
|
|
||||||
<DefaultResolution>Tc3_EventLogger, * (Beckhoff Automation GmbH)</DefaultResolution>
|
|
||||||
<Namespace>Tc3_EventLogger</Namespace>
|
|
||||||
</PlaceholderReference>
|
|
||||||
<PlaceholderReference Include="Tc3_Module">
|
|
||||||
<DefaultResolution>Tc3_Module, * (Beckhoff Automation GmbH)</DefaultResolution>
|
|
||||||
<Namespace>Tc3_Module</Namespace>
|
|
||||||
<SystemLibrary>true</SystemLibrary>
|
|
||||||
</PlaceholderReference>
|
|
||||||
<PlaceholderReference Include="TcUnit">
|
|
||||||
<DefaultResolution>TcUnit, * (www.tcunit.org)</DefaultResolution>
|
|
||||||
<Namespace>TcUnit</Namespace>
|
|
||||||
</PlaceholderReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="PLC.tmc">
|
|
||||||
<SubType>Content</SubType>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ProjectExtensions>
|
|
||||||
<PlcProjectOptions>
|
|
||||||
<XmlArchive>
|
|
||||||
<Data>
|
|
||||||
<o xml:space="preserve" t="OptionKey">
|
|
||||||
<v n="Name">"<ProjectRoot>"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" ckt="String" cvt="OptionKey">
|
|
||||||
<v>{192FAD59-8248-4824-A8DE-9177C94C195A}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{192FAD59-8248-4824-A8DE-9177C94C195A}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
<v>{246001F4-279D-43AC-B241-948EB31120E1}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{246001F4-279D-43AC-B241-948EB31120E1}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
<v>{29BD8D0C-3586-4548-BB48-497B9A01693F}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{29BD8D0C-3586-4548-BB48-497B9A01693F}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" ckt="String" cvt="OptionKey">
|
|
||||||
<v>NamingConventions</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"NamingConventions"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
<v>Rules</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"Rules"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
</d>
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
<v>{40450F57-0AA3-4216-96F3-5444ECB29763}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{40450F57-0AA3-4216-96F3-5444ECB29763}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
<v>{8A0FB252-96EB-4DCC-A5B4-B4804D05E2D6}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{8A0FB252-96EB-4DCC-A5B4-B4804D05E2D6}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" ckt="String" cvt="Boolean">
|
|
||||||
<v>WriteLineIDs</v>
|
|
||||||
<v>False</v>
|
|
||||||
</d>
|
|
||||||
</o>
|
|
||||||
<v>{8F99A816-E488-41E4-9FA3-846536012284}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{8F99A816-E488-41E4-9FA3-846536012284}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" ckt="String" cvt="String">
|
|
||||||
<v>DisabledWarningIds</v>
|
|
||||||
<v>410,5410</v>
|
|
||||||
</d>
|
|
||||||
</o>
|
|
||||||
<v>{F66C7017-BDD8-4114-926C-81D6D687E35F}</v>
|
|
||||||
<o>
|
|
||||||
<v n="Name">"{F66C7017-BDD8-4114-926C-81D6D687E35F}"</v>
|
|
||||||
<d n="SubKeys" t="Hashtable" />
|
|
||||||
<d n="Values" t="Hashtable" ckt="String" cvt="Boolean">
|
|
||||||
<v>CalcActiveTransOnly</v>
|
|
||||||
<v>True</v>
|
|
||||||
</d>
|
|
||||||
</o>
|
|
||||||
</d>
|
|
||||||
<d n="Values" t="Hashtable" />
|
|
||||||
</o>
|
|
||||||
</Data>
|
|
||||||
<TypeList>
|
|
||||||
<Type n="Boolean">System.Boolean</Type>
|
|
||||||
<Type n="Hashtable">System.Collections.Hashtable</Type>
|
|
||||||
<Type n="OptionKey">{54dd0eac-a6d8-46f2-8c27-2f43c7e49861}</Type>
|
|
||||||
<Type n="String">System.String</Type>
|
|
||||||
</TypeList>
|
|
||||||
</XmlArchive>
|
|
||||||
</PlcProjectOptions>
|
|
||||||
</ProjectExtensions>
|
|
||||||
</Project>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<TcPlcObject Version="1.1.0.1">
|
|
||||||
<POU Name="MAIN" Id="{f325d0cd-99c8-4d5b-980f-1fc96ab1417c}" SpecialFunc="None">
|
|
||||||
<Declaration><![CDATA[PROGRAM MAIN
|
|
||||||
VAR
|
|
||||||
// Analog I/O tests
|
|
||||||
_fbAnalogInputTest : FB_AnalogInputTest;
|
|
||||||
END_VAR
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[TcUnit.RUN();]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
</POU>
|
|
||||||
</TcPlcObject>
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<TcPlcObject Version="1.1.0.1">
|
|
||||||
<POU Name="FB_Machine" Id="{2a7d0c64-8fe2-4a47-820b-42d0ca475bdf}" SpecialFunc="None">
|
|
||||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_Machine EXTENDS FB_ModuleBase
|
|
||||||
VAR_INPUT
|
|
||||||
END_VAR
|
|
||||||
VAR_OUTPUT
|
|
||||||
END_VAR
|
|
||||||
VAR
|
|
||||||
// Debug tags
|
|
||||||
_xRaiseError : BOOL;
|
|
||||||
_xRaiseWarning : BOOL;
|
|
||||||
|
|
||||||
// Alarms
|
|
||||||
_fbError : FB_TcAlarm;
|
|
||||||
_fbWarning : FB_TcAlarm;
|
|
||||||
|
|
||||||
// Helper
|
|
||||||
_xFirstCycle : BOOL := TRUE;
|
|
||||||
END_VAR
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[IF _xFirstCycle THEN
|
|
||||||
_xFirstCycle := FALSE;
|
|
||||||
|
|
||||||
_fbError.CreateEx(stEventEntry := TC_EVENTS.TestAlarms.TestError, FALSE, NULL);
|
|
||||||
_fbWarning.CreateEx(stEventEntry := TC_EVENTS.TestAlarms.TestWarning, FALSE, NULL);
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
// ==============
|
|
||||||
// SLM_BASE stuff
|
|
||||||
// ==============
|
|
||||||
|
|
||||||
|
|
||||||
// ==============
|
|
||||||
// Error handling
|
|
||||||
// ==============
|
|
||||||
|
|
||||||
IF _xRaiseError AND (NOT _fbError.bRaised) THEN
|
|
||||||
_fbError.Raise(0);
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
IF _fbError.bRaised AND (NOT _xRaiseError) THEN
|
|
||||||
_fbError.Clear(0, FALSE);
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
|
|
||||||
// ==============
|
|
||||||
// Warning handling
|
|
||||||
// ==============
|
|
||||||
|
|
||||||
IF _xRaiseWarning AND (NOT _fbWarning.bRaised) THEN
|
|
||||||
_fbWarning.Raise(0);
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
IF _fbWarning.bRaised AND (NOT _xRaiseWarning) THEN
|
|
||||||
_fbWarning.Clear(0, FALSE);
|
|
||||||
END_IF]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
<Method Name="HandleError" Id="{a110de09-0389-4020-aba6-4f381a626cfb}">
|
|
||||||
<Declaration><![CDATA[METHOD HandleError : SLM_Base.E_ReturnCode
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
</Method>
|
|
||||||
<Method Name="HandleSignals" Id="{bd53d3b3-4cc9-43e1-81da-f4f9f4a8e439}">
|
|
||||||
<Declaration><![CDATA[METHOD HandleSignals : SLM_Base.E_ReturnCode
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
</Method>
|
|
||||||
<Method Name="InitialOP" Id="{9006096c-4c67-4231-b0b0-02f92f5119b5}">
|
|
||||||
<Declaration><![CDATA[METHOD InitialOP : SLM_Base.E_ReturnCode
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[InitialOP := E_ReturnCode.SUCCESS;]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
</Method>
|
|
||||||
<Method Name="SetConfig" Id="{8a7c676f-fdbb-44cc-a84d-1ccc592972a9}">
|
|
||||||
<Declaration><![CDATA[(*! @summary Sets config for this entity*)
|
|
||||||
METHOD SetConfig
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
</Method>
|
|
||||||
</POU>
|
|
||||||
</TcPlcObject>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<TcPlcObject Version="1.1.0.1">
|
|
||||||
<POU Name="MAIN_TESTS" Id="{c66c285f-4cfe-4893-8066-e22fe681dd3f}" SpecialFunc="None">
|
|
||||||
<Declaration><![CDATA[PROGRAM MAIN_TESTS
|
|
||||||
VAR
|
|
||||||
_fbMachine : FB_Machine(0, 'Machine');
|
|
||||||
|
|
||||||
// Startup state machine
|
|
||||||
_iState : INT := 0;
|
|
||||||
END_VAR
|
|
||||||
]]></Declaration>
|
|
||||||
<Implementation>
|
|
||||||
<ST><![CDATA[CASE _iState OF
|
|
||||||
0:
|
|
||||||
IF IsSuccessful(_fbMachine.InitialOP()) THEN
|
|
||||||
_fbMachine.CyclicOP();
|
|
||||||
_iState := 10;
|
|
||||||
END_IF
|
|
||||||
|
|
||||||
10:
|
|
||||||
_fbMachine.CyclicOP();
|
|
||||||
END_CASE]]></ST>
|
|
||||||
</Implementation>
|
|
||||||
</POU>
|
|
||||||
</TcPlcObject>
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user