Added OneShot Method to FB_AlarmMessage

This commit is contained in:
2026-02-16 13:04:11 +01:00
parent 181f0df20f
commit 4207215198
3 changed files with 25 additions and 13 deletions

View File

@@ -136,7 +136,7 @@
</System> </System>
<Plc> <Plc>
<Project GUID="{4E62D9E7-436C-457D-8DC4-82D2FEF91C96}" Name="BasicComponents" PrjFilePath="BasicComponents\BasicComponents.plcproj" TmcFilePath="BasicComponents\BasicComponents.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true"> <Project GUID="{4E62D9E7-436C-457D-8DC4-82D2FEF91C96}" Name="BasicComponents" PrjFilePath="BasicComponents\BasicComponents.plcproj" TmcFilePath="BasicComponents\BasicComponents.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true">
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{B7757519-28FA-424D-AB4A-AF3716E16F4E}" TmcPath="BasicComponents\BasicComponents.tmc"> <Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{2E36E833-E01D-0D57-5C06-57C34D27F5F4}" TmcPath="BasicComponents\BasicComponents.tmc">
<Name>BasicComponents Instance</Name> <Name>BasicComponents Instance</Name>
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID> <CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
<Vars VarGrpType="2" AreaNo="1"> <Vars VarGrpType="2" AreaNo="1">

View File

@@ -2693,7 +2693,7 @@
<Type n="String">System.String</Type> <Type n="String">System.String</Type>
<Type n="UInt32">System.UInt32</Type> <Type n="UInt32">System.UInt32</Type>
</TypeList> </TypeList>
</XmlArchive> </XmlArchive>
</PlcProjectOptions> </PlcProjectOptions>
</ProjectExtensions> </ProjectExtensions>
</Project> </Project>

View File

@@ -103,6 +103,18 @@ _fbSourceInfo.sName := _sLeft;
_fbAlarmMessage.CreateEx(stEventEntry := stEventEntry, bWithConfirmation := xWithConfirmation);]]></ST> _fbAlarmMessage.CreateEx(stEventEntry := stEventEntry, bWithConfirmation := xWithConfirmation);]]></ST>
</Implementation> </Implementation>
</Method> </Method>
<Method Name="M_OneShot" Id="{c9a496b6-62af-4667-8e90-61cb03facef6}">
<Declaration><![CDATA[METHOD M_OneShot
VAR_INPUT
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[// Raise alarm
IF xRelease AND (NOT xInUnitTestMode) AND (NOT _fbAlarmMessage.bRaised) THEN
_fbAlarmMessage.Raise(0);
END_IF]]></ST>
</Implementation>
</Method>
<Property Name="Raised" Id="{2254f7ab-28c0-02ea-0e65-a373d9d5b007}"> <Property Name="Raised" Id="{2254f7ab-28c0-02ea-0e65-a373d9d5b007}">
<Declaration><![CDATA[PROPERTY Raised : BOOL]]></Declaration> <Declaration><![CDATA[PROPERTY Raised : BOOL]]></Declaration>
<Get Name="Get" Id="{402fa563-3cdd-092f-24cf-a227bf8b3ef3}"> <Get Name="Get" Id="{402fa563-3cdd-092f-24cf-a227bf8b3ef3}">