Alarm Manager updated to work with the Codesys Messaging app for sending email alarms messages.
This commit is contained in:
parent
2e16e15054
commit
8307b86753
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
<Symbolconfiguration xmlns="http://www.3s-software.com/schemas/Symbolconfiguration.xsd">
|
<Symbolconfiguration xmlns="http://www.3s-software.com/schemas/Symbolconfiguration.xsd">
|
||||||
<Header>
|
<Header>
|
||||||
<Version>3.5.14.0</Version>
|
<Version>3.5.14.0</Version>
|
||||||
<SymbolConfigObject version="4.5.2.0" runtimeid="3.5.19.61" libversion="4.5.0.0" compiler="3.5.21.10" lmm="3.5.21.10" profile="CODESYS V3.5 SP21 Patch 1+" settings="SupportOPCUA, LayoutCalculator=OptimizedClientSideLayoutCalculator" />
|
<SymbolConfigObject version="4.5.2.0" runtimeid="3.5.21.0" libversion="4.5.0.0" compiler="3.5.21.10" lmm="3.5.21.10" profile="CODESYS V3.5 SP21 Patch 1+" settings="SupportOPCUA, XmlIncludeComments, LayoutCalculator=OptimizedClientSideLayoutCalculator" />
|
||||||
<ProjectInfo name="cr_barn5" devicename="Device" appname="Application" />
|
<ProjectInfo name="cr_barn5" devicename="Device" appname="Application" />
|
||||||
</Header>
|
</Header>
|
||||||
<TypeList>
|
<TypeList>
|
||||||
@ -12,18 +12,12 @@
|
|||||||
<TypeSimple name="T_INT" size="2" swapsize="2" typeclass="Int" iecname="INT" />
|
<TypeSimple name="T_INT" size="2" swapsize="2" typeclass="Int" iecname="INT" />
|
||||||
<TypeSimple name="T_LDATE_AND_TIME" size="8" swapsize="8" typeclass="LDateAndTime" iecname="LDATE_AND_TIME" />
|
<TypeSimple name="T_LDATE_AND_TIME" size="8" swapsize="8" typeclass="LDateAndTime" iecname="LDATE_AND_TIME" />
|
||||||
<TypeSimple name="T_STRING" size="81" swapsize="0" typeclass="String" iecname="STRING" />
|
<TypeSimple name="T_STRING" size="81" swapsize="0" typeclass="String" iecname="STRING" />
|
||||||
<TypeSimple name="T_STRING_100_" size="101" swapsize="0" typeclass="String" iecname="STRING(100)" />
|
|
||||||
<TypeSimple name="T_UINT" size="2" swapsize="2" typeclass="UInt" iecname="UINT" />
|
<TypeSimple name="T_UINT" size="2" swapsize="2" typeclass="UInt" iecname="UINT" />
|
||||||
<TypeUserDef name="T_atAlarmEventType" size="2" nativesize="2" swapsize="2" typeclass="Enum" iecname="atAlarmEventType" basetype="T_INT">
|
<TypeUserDef name="T_atAlarmEventType" size="2" nativesize="2" swapsize="2" typeclass="Enum" iecname="atAlarmEventType" basetype="T_INT">
|
||||||
<UserDefElement type="T_atAlarmEventType" iecname="null" enumvalue="0" />
|
<UserDefElement type="T_atAlarmEventType" iecname="null" enumvalue="0" />
|
||||||
<UserDefElement type="T_atAlarmEventType" iecname="alm" enumvalue="1" />
|
<UserDefElement type="T_atAlarmEventType" iecname="alm" enumvalue="1" />
|
||||||
<UserDefElement type="T_atAlarmEventType" iecname="rtn" enumvalue="2" />
|
<UserDefElement type="T_atAlarmEventType" iecname="rtn" enumvalue="2" />
|
||||||
</TypeUserDef>
|
</TypeUserDef>
|
||||||
<TypeUserDef name="T_atMessagingAlarm" size="203" nativesize="216" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessagingAlarm">
|
|
||||||
<UserDefElement iecname="state" type="T_BOOL" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
|
||||||
<UserDefElement iecname="textALM" type="T_STRING_100_" byteoffset="1" vartype="VAR_INPUT" access="ReadWrite" />
|
|
||||||
<UserDefElement iecname="textRTN" type="T_STRING_100_" byteoffset="102" vartype="VAR_INPUT" access="ReadWrite" />
|
|
||||||
</TypeUserDef>
|
|
||||||
<TypeUserDef name="T_atMessagingEmailAddress" size="82" nativesize="96" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessagingEmailAddress">
|
<TypeUserDef name="T_atMessagingEmailAddress" size="82" nativesize="96" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessagingEmailAddress">
|
||||||
<UserDefElement iecname="address" type="T_STRING" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="address" type="T_STRING" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
<UserDefElement iecname="enabled" type="T_BOOL" byteoffset="81" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="enabled" type="T_BOOL" byteoffset="81" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
@ -33,9 +27,6 @@
|
|||||||
<UserDefElement iecname="lastStatus" type="T_BOOL" byteoffset="81" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="lastStatus" type="T_BOOL" byteoffset="81" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
<UserDefElement iecname="lastStatusTime" type="T_LDATE_AND_TIME" byteoffset="88" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="lastStatusTime" type="T_LDATE_AND_TIME" byteoffset="88" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
</TypeUserDef>
|
</TypeUserDef>
|
||||||
<TypeArray name="T_ARRAY__0__9__OF_atMessagingAlarm" size="2030" nativesize="2160" typeclass="Array" iecname="ARRAY [0..9] OF atMessagingAlarm" basetype="T_atMessagingAlarm">
|
|
||||||
<ArrayDim minrange="0" maxrange="9" />
|
|
||||||
</TypeArray>
|
|
||||||
<TypeArray name="T_ARRAY__0__9__OF_atMessagingEmailAddress" size="820" nativesize="960" typeclass="Array" iecname="ARRAY [0..9] OF atMessagingEmailAddress" basetype="T_atMessagingEmailAddress">
|
<TypeArray name="T_ARRAY__0__9__OF_atMessagingEmailAddress" size="820" nativesize="960" typeclass="Array" iecname="ARRAY [0..9] OF atMessagingEmailAddress" basetype="T_atMessagingEmailAddress">
|
||||||
<ArrayDim minrange="0" maxrange="9" />
|
<ArrayDim minrange="0" maxrange="9" />
|
||||||
</TypeArray>
|
</TypeArray>
|
||||||
@ -48,9 +39,6 @@
|
|||||||
<TypeArray name="T_ARRAY__0__249__OF_atAlarmStatus" size="42000" nativesize="44000" typeclass="Array" iecname="ARRAY [0..249] OF atAlarmStatus" basetype="T_atAlarmStatus">
|
<TypeArray name="T_ARRAY__0__249__OF_atAlarmStatus" size="42000" nativesize="44000" typeclass="Array" iecname="ARRAY [0..249] OF atAlarmStatus" basetype="T_atAlarmStatus">
|
||||||
<ArrayDim minrange="0" maxrange="249" />
|
<ArrayDim minrange="0" maxrange="249" />
|
||||||
</TypeArray>
|
</TypeArray>
|
||||||
<TypeArray name="T_ARRAY__0__99__OF_atAlarmStatus" size="16800" nativesize="17600" typeclass="Array" iecname="ARRAY [0..99] OF atAlarmStatus" basetype="T_atAlarmStatus">
|
|
||||||
<ArrayDim minrange="0" maxrange="99" />
|
|
||||||
</TypeArray>
|
|
||||||
<TypeUserDef name="T_atMessagingEmailSettings" size="1310" nativesize="1472" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessagingEmailSettings">
|
<TypeUserDef name="T_atMessagingEmailSettings" size="1310" nativesize="1472" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessagingEmailSettings">
|
||||||
<UserDefElement iecname="server" type="T_STRING" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="server" type="T_STRING" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
<UserDefElement iecname="smtpPort" type="T_UINT" byteoffset="82" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="smtpPort" type="T_UINT" byteoffset="82" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
@ -62,15 +50,10 @@
|
|||||||
<UserDefElement iecname="toAddress" type="T_ARRAY__0__9__OF_atMessagingEmailAddress" byteoffset="409" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="toAddress" type="T_ARRAY__0__9__OF_atMessagingEmailAddress" byteoffset="409" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
<UserDefElement iecname="subject" type="T_STRING" byteoffset="1229" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="subject" type="T_STRING" byteoffset="1229" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
</TypeUserDef>
|
</TypeUserDef>
|
||||||
<TypeUserDef name="T_atAlarmManager" size="100812" nativesize="124576" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atAlarmManager">
|
<TypeUserDef name="T_atAlarmManager" size="42000" nativesize="124576" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atAlarmManager">
|
||||||
<UserDefElement iecname="active" type="T_ARRAY__0__249__OF_atAlarmStatus" byteoffset="0" vartype="VAR_OUTPUT" access="Read" />
|
<UserDefElement iecname="all" type="T_ARRAY__0__249__OF_atAlarmStatus" byteoffset="0" vartype="VAR_OUTPUT" access="ReadWrite" />
|
||||||
<UserDefElement iecname="activeCnt" type="T_DINT" byteoffset="42000" vartype="VAR_OUTPUT" access="Read" />
|
|
||||||
<UserDefElement iecname="all" type="T_ARRAY__0__249__OF_atAlarmStatus" byteoffset="42004" vartype="VAR_OUTPUT" access="Read" />
|
|
||||||
<UserDefElement iecname="alarmCnt" type="T_DINT" byteoffset="84004" vartype="VAR_OUTPUT" access="Read" />
|
|
||||||
<UserDefElement iecname="logCnt" type="T_DINT" byteoffset="84008" vartype="VAR_OUTPUT" access="Read" />
|
|
||||||
<UserDefElement iecname="alarmLog" type="T_ARRAY__0__99__OF_atAlarmStatus" byteoffset="84012" vartype="VAR_OUTPUT" access="Read" />
|
|
||||||
</TypeUserDef>
|
</TypeUserDef>
|
||||||
<TypeUserDef name="T_atMessaging" size="1408" nativesize="1600" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessaging">
|
<TypeUserDef name="T_atMessaging" size="1408" nativesize="1584" typeclass="Userdef" pouclass="FUNCTION_BLOCK" iecname="atMessaging">
|
||||||
<UserDefElement iecname="emailSettings" type="T_atMessagingEmailSettings" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
<UserDefElement iecname="emailSettings" type="T_atMessagingEmailSettings" byteoffset="0" vartype="VAR_INPUT" access="ReadWrite" />
|
||||||
<UserDefElement iecname="emailStatus" type="T_atMessagingEmailStatus" byteoffset="1312" vartype="VAR_OUTPUT" access="ReadWrite" />
|
<UserDefElement iecname="emailStatus" type="T_atMessagingEmailStatus" byteoffset="1312" vartype="VAR_OUTPUT" access="ReadWrite" />
|
||||||
</TypeUserDef>
|
</TypeUserDef>
|
||||||
@ -79,16 +62,44 @@
|
|||||||
<Node name="Application">
|
<Node name="Application">
|
||||||
<Node name="AlarmManager">
|
<Node name="AlarmManager">
|
||||||
<Node name="AlarmGlobals">
|
<Node name="AlarmGlobals">
|
||||||
<Node name="g_diAlarmStateTransitionCounter" type="T_DINT" access="Read" />
|
<Comment> This GVL must be initialized before GVL "GloballyForAlarmStorage", because this GVL
|
||||||
<Node name="g_diAlarmStorageCounter" type="T_DINT" access="Read" />
|
causes the initialization of the variable g_stApplicationName.
|
||||||
<Node name="g_iAlarmStorageClear" type="T_INT" access="Read" />
|
We only need the date and time format pattern for the converted code, therefore
|
||||||
|
we can (and must!) omit the rest from conversion
|
||||||
|
We must not use an attribute to hide this GVL, because there are some variables,
|
||||||
|
that a developer might use. Additionally it is necessary, that this GVL in considered
|
||||||
|
in the data server, but not visible for the user, because some variables of this GVL
|
||||||
|
are added to the data source selection implicitely and for this purpose it is necessary,
|
||||||
|
that this GVL is a part of the available items tree.</Comment>
|
||||||
|
<Node name="g_diAlarmStateTransitionCounter" type="T_DINT" access="Read">
|
||||||
|
<Comment> A global counter, that counts all the alarm state transitions, that occur.
|
||||||
|
Needed by the alarm table for optimized painting. If this counter doesn't
|
||||||
|
change during subsequent paint calls, the same alarms have been active and
|
||||||
|
in the same state.
|
||||||
|
Conditional show attribute must not be present for this variable, because
|
||||||
|
some architectural problems it can lead in a not correct regitration
|
||||||
|
CHECKED_OMIT</Comment>
|
||||||
|
</Node>
|
||||||
|
<Node name="g_diAlarmStorageCounter" type="T_DINT" access="Read">
|
||||||
|
<Comment> A similar counter, that will be incremented each time an alarm is written
|
||||||
|
into the alarm storage. This allows the alarm table to detect, whether
|
||||||
|
some kind of processing has to be done, because there exists a new alarm.
|
||||||
|
Conditional show attribute must not be present for this variable, because
|
||||||
|
some architectural problems it can lead in a not correct regitration
|
||||||
|
CHECKED_OMIT</Comment>
|
||||||
|
</Node>
|
||||||
|
<Node name="g_iAlarmStorageClear" type="T_INT" access="Read">
|
||||||
|
<Comment> Counts the times when the alarm table has been deleted.
|
||||||
|
CHECKED_OMIT</Comment>
|
||||||
|
</Node>
|
||||||
</Node>
|
</Node>
|
||||||
</Node>
|
</Node>
|
||||||
<Node name="atGVL">
|
<Node name="atGVL">
|
||||||
<Node name="alarmManager" type="T_atAlarmManager" access="Read" />
|
<Node name="alarmManager" type="T_atAlarmManager" access="ReadWrite">
|
||||||
|
<Comment>Alarm logging and active alarm count</Comment>
|
||||||
|
</Node>
|
||||||
</Node>
|
</Node>
|
||||||
<Node name="Message">
|
<Node name="Message">
|
||||||
<Node name="alarms" type="T_ARRAY__0__9__OF_atMessagingAlarm" access="ReadWrite" />
|
|
||||||
<Node name="messaging" type="T_atMessaging" access="ReadWrite" />
|
<Node name="messaging" type="T_atMessaging" access="ReadWrite" />
|
||||||
</Node>
|
</Node>
|
||||||
</Node>
|
</Node>
|
||||||
|
|||||||
Binary file not shown.
4
Development/cr_barn5.~u
Normal file
4
Development/cr_barn5.~u
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
c
|
||||||
|
CLARENCE-PC
|
||||||
|
40716
|
||||||
|
638930359052981611
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user