Skip to content

Commit

Permalink
Merge branch 'release/v1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
langstonb committed Feb 28, 2023
2 parents d01f51f + c36e691 commit e57461b
Show file tree
Hide file tree
Showing 628 changed files with 6,875 additions and 7,489 deletions.
207 changes: 0 additions & 207 deletions mappFramework/Diagnosis/Simulation/PC/AlarmMgr.PVM

This file was deleted.

192 changes: 192 additions & 0 deletions mappFramework/Diagnosis/Simulation/PC/RecipeMgr.PVM

Large diffs are not rendered by default.

Binary file modified mappFramework/Logical/ChineseHelp/mappFramework.chm
Binary file not shown.
413 changes: 413 additions & 0 deletions mappFramework/Logical/Infrastructure/AlarmX/AlarmImportExport.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
PROGRAM _INIT

// Create folder for this component on the user file device
DirCreate_0(enable := TRUE, pDevice := ADR('UserPartition'), pName := ADR(LOCAL_FOLDER));
DirCreate_0(enable := TRUE, pDevice := ADR('mappAlarmXFiles'), pName := ADR('/'));

// Check if folder already exist and if so disabled the function block call
IF DirCreate_0.status = fiERR_DIR_ALREADY_EXIST THEN
Expand Down
16 changes: 14 additions & 2 deletions mappFramework/Logical/Infrastructure/AlarmX/AlarmMgr/AlarmMgr.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ TYPE
AlarmHmiInterfaceType : STRUCT (*Structure to hold commands and status from the HMI*)
Commands : AlarmCommandsType; (*HMI commands*)
Status : {REDUND_UNREPLICABLE} AlarmStatusType; (*HMI status*)
Parameters : AlarmParametersType; (*HMI parameters*)
END_STRUCT;
AlarmCommandsType : STRUCT (*Structure to hold the commands from the HMI*)
ExportAlarms : BOOL; (*Triggers an alarm export of the alarm history. Connected to a button on the HMI. *)
RunQuery : BOOL; (*Triggers the query to run. Connected to a button on the HMI. *)
END_STRUCT;
AlarmStatusType : STRUCT (*Structure to hold status information from the mapp View HMI. (This structure is not compatible/relevant if you are using a VC4 visualization)*)
AlarmParametersType : STRUCT (*Structure to hold the parameters from the HMI*)
InstanceID : UINT; (*The instanceID of the alarm that was most recently clicked in the AlarmList. Set by an eventbinding in mapp View*)
END_STRUCT;
AlarmStatusType : STRUCT (*Structure to hold status information to the mapp View HMI. (This structure is not compatible/relevant if you are using a VC4 visualization)*)
AlarmHistSortCfg : STRING[1000]; (*Sort configuration property for the AlarmHistory widget *)
AlarmHistFilterCfg : STRING[1000]; (*Filter configuration property for the AlarmHistory widget*)
AlarmSortCfg : STRING[1000]; (*Sort configuration for the AlarmList widget*)
AlarmFilterCfg : STRING[1000]; (*Filter configuration for the AlarmList widget*)
TableConfig : ARRAY[0..1]OF STRING[120]; (*Table configuration for the alarm query Table*)
Query : AlarmQueryHMIType; (*Structure which rearranges the query data from AlarmQuery into a structure of arrays for easy connection to the Table widget*)
InstanceID : UINT; (*The instanceID of the alarm that was most recently clicked in the AlarmList. Set by an eventbinding in mapp View*)
END_STRUCT;
AlarmQueryType : STRUCT (*Structure for query results and status*)
State : ActiveAlarmStateEnum; (*State variable for the query state machine*)
Expand All @@ -35,6 +38,7 @@ TYPE
TimeStamp : ARRAY[0..MAX_QUERY_RESULTS]OF DATE_AND_TIME; (*TimeStamp array*)
Code : ARRAY[0..MAX_QUERY_RESULTS]OF UDINT; (*Code array*)
Severity : ARRAY[0..MAX_QUERY_RESULTS]OF UDINT; (*Severity array*)
State : ARRAY[0..MAX_QUERY_RESULTS]OF CurrentAlarmStateEnum; (*State message array*)
QueryCount : USINT; (*Count of query results for building the query table configuration string*)
END_STRUCT;
AlarmType : STRUCT (*Structure to hold the alarm data for the query results*)
Expand All @@ -47,6 +51,7 @@ TYPE
TimeStamp : DATE_AND_TIME; (*ActiveAlarms query, TimeStamp column*)
Code : UDINT; (*ActiveAlarms query, Code column*)
Severity : UDINT; (*ActiveAlarms query, Severity column*)
State : CurrentAlarmStateEnum; (*ActiveAlarms query, State column*)
END_STRUCT;
MachineDigitalInputsType : STRUCT (*Safety related digital inputs *)
EmergencyStop : ARRAY[0..MAX_ESTOP]OF BOOL; (*Emergency stop input signals*)
Expand All @@ -72,4 +77,11 @@ TYPE
ACTIVE_ALARM_QUERY, (*State to query the alarm data*)
ACTIVE_ALARM_NEXT (*State to check if more alarms meet the query criteria and need to be queried*)
);
CurrentAlarmStateEnum :
( (*Enumeration for the state of a particular alarm*)
INACTIVE_NOT_ACKNOWLEDGED := 0, (*Alarm inactive and not acknowledged*)
ACTIVE_NOT_ACKNOWLEDGED := 1, (*Alarm active and not acknowledged*)
ACTIVE_ACKNOWLEDGED := 2, (*Alarm active and acknowledged*)
INACTIVE_ACKNOWLEDGED := 3 (*Alarm inactive and acknowledged*)
);
END_TYPE
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ VAR CONSTANT
MAX_QUERY_RESULTS : USINT := 19; (*Maximum number of query results (Value+1)*)
MAX_SAFETY_DOOR : UINT := 5; (*Maximum number of safety doors (Value+1)*)
MAX_ESTOP : UINT := 2; (*Maximum number of emergency stops (Value+1)*)
LOCAL_FOLDER : STRING[10] := 'AlarmX'; (*Folder name on the file device for AlarmX files*)
END_VAR
(*Structure Types*)
VAR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ ACTION ExecuteQuery:
HmiAlarmX.Status.Query.AdditionalInfo[i] := AlarmQuery.Alarms[i].AdditionalInfo;
HmiAlarmX.Status.Query.TimeStamp[i] := AlarmQuery.Alarms[i].TimeStamp;
HmiAlarmX.Status.Query.Severity[i] := AlarmQuery.Alarms[i].Severity;

IF HmiAlarmX.Status.Query.Active[i] AND NOT HmiAlarmX.Status.Query.Acknowledged[i] THEN
HmiAlarmX.Status.Query.State[i] := ACTIVE_NOT_ACKNOWLEDGED;
ELSIF HmiAlarmX.Status.Query.Active[i] AND HmiAlarmX.Status.Query.Acknowledged[i] THEN
HmiAlarmX.Status.Query.State[i] := ACTIVE_ACKNOWLEDGED;
ELSIF NOT HmiAlarmX.Status.Query.Active[i] AND NOT HmiAlarmX.Status.Query.Acknowledged[i] THEN
HmiAlarmX.Status.Query.State[i] := INACTIVE_NOT_ACKNOWLEDGED;
ELSIF NOT HmiAlarmX.Status.Query.Active[i] AND HmiAlarmX.Status.Query.Acknowledged[i] THEN
HmiAlarmX.Status.Query.State[i] := INACTIVE_ACKNOWLEDGED;
END_IF

END_FOR


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ACTION GetBacktraceInformation:
FOR i := 0 TO MaxIndex DO
IF (MpAlarmXCore_0.PendingAlarms = 0) THEN
// No pending alarms, reset instance id
HmiAlarmX.Status.InstanceID := 0;
HmiAlarmX.Parameters.InstanceID := 0;
EXIT;
END_IF

IF (MpAlarmXListUIConnect.AlarmList.InstanceID[i] = HmiAlarmX.Status.InstanceID) THEN
IF (MpAlarmXListUIConnect.AlarmList.InstanceID[i] = HmiAlarmX.Parameters.InstanceID) THEN
// Found an alarm
MpAlarmXListUIConnect.AlarmList.SelectedIndex := i;
EXIT;
Expand Down
16 changes: 9 additions & 7 deletions mappFramework/Logical/Infrastructure/AlarmX/Package.pkg
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="Program" Language="IEC" Description="Alarm manager">AlarmMgr</Object>
<Object Type="File" Description="Localizable text for alarms">Alarms.tmx</Object>
</Objects>
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="Program" Language="IEC" Description="Alarm manager">AlarmMgr</Object>
<Object Type="File" Description="Localizable text for alarms">Alarms.tmx</Object>
<Object Type="File" Description="Python script to Import or Export mpAlarmXCore files">AlarmImportExport.py</Object>
<Object Type="File" Description="Unit Tests for AlarmImportExport">test_AlarmImportExport.py</Object>
</Objects>
</Package>
Loading

0 comments on commit e57461b

Please sign in to comment.