Alarms Management

LANGUAGE: Karel

CREATED: 2019-01-01

MODIFIED: 2019-01-01

CODE    tag icon

/PROG  BGLALARMS
/ATTR
OWNER  = MNEDITOR;
COMMENT  = “Gestion Alarmes”;
PROG_SIZE = 2010;
CREATE  = DATE 19-11-21  TIME 11:25:58;
MODIFIED = DATE 19-11-21  TIME 11:33:28;
FILE_NAME = ;
VERSION  = 0;
LINE_COUNT = 85;
MEMORY_SIZE = 2298;
PROTECT  = READ_WRITE;
TCD:  STACK_SIZE = 0,
TASK_PRIORITY = 50,
TIME_SLICE = 0,
BUSY_LAMP_OFF = 0,
ABORT_REQUEST = 0,
PAUSE_REQUEST = 0;
DEFAULT_GROUP = *,*,*,*,*;
CONTROL_CODE = 00000000 00000000;
/MN
1:  –eg:Copyright (c) 2019 DIY-Robotics.com All rights reserved. ;
2:  –eg: ;
3:  –eg:Redistribution and use in source and binary forms, with or without ;
4:  –eg:modification, are permitted provided that the following conditions
:  are ;
5:  –eg:met: ;
6:  –eg: ;
7:  –eg:Redistributions of source code must retain the above copyright ;
8:  –eg:notice, this list of conditions and the following disclaimer. ;
9:  –eg:Redistributions in binary form must reproduce the above ;
10:  –eg:copyright notice, this list of conditions and the following
:  disclaimer ;
11:  –eg:in the documentation and/or other materials provided with the ;
12:  –eg:distribution. ;
13:  –eg:Neither the name of DIY-Robotics.com nor the names of its ;
14:  –eg:contributors may be used to endorse or promote products derived from ;
15:  –eg:this software without specific prior written permission. ;
16:  –eg: ;
17:  !ALARMS RESET ;
18:  IF (DI[3:ResetBtn]=ON) THEN ;
19:  F[30:CellAlarm]=(OFF) ;
20:  F[31:UAlarm1]=(OFF) ;
21:  F[32:UAlarm2]=(OFF) ;
22:  F[33:UAlarm3]=(OFF) ;
23:  F[34:UAlarm4]=(OFF) ;
24:  F[35:UAlarm5]=(OFF) ;
25:  F[36:UAlarm6]=(OFF) ;
26:  F[37:UAlarm7]=(OFF) ;
27:  F[38:UAlarm8]=(OFF) ;
28:  F[39:UAlarm9]=(OFF) ;
29:  F[40:UAlarm10]=(OFF) ;
30:  ENDIF ;
31:   ;
32:  IF (F[31:UAlarm1]) THEN ;
33:  UALM[1] ;
34:  F[30:CellAlarm]=(ON) ;
35:  ENDIF ;
36:   ;
37:  IF (F[32:UAlarm2]) THEN ;
38:  UALM[2] ;
39:  F[30:CellAlarm]=(ON) ;
40:  ENDIF ;
41:   ;
42:  IF (F[33:UAlarm3]) THEN ;
43:  UALM[3] ;
44:  F[30:CellAlarm]=(ON) ;
45:  ENDIF ;
46:   ;
47:  IF (F[34:UAlarm4]) THEN ;
48:  UALM[4] ;
49:  F[30:CellAlarm]=(ON) ;
50:  ENDIF ;
51:   ;
52:  IF (F[35:UAlarm5]) THEN ;
53:  UALM[5] ;
54:  F[30:CellAlarm]=(ON) ;
55:  ENDIF ;
56:   ;
57:  IF (F[36:UAlarm6]) THEN ;
58:  UALM[6] ;
59:  F[30:CellAlarm]=(ON) ;
60:  ENDIF ;
61:   ;
62:  IF (F[37:UAlarm7]) THEN ;
63:  UALM[7] ;
64:  F[30:CellAlarm]=(ON) ;
65:  ENDIF ;
66:   ;
67:  IF (F[38:UAlarm8]) THEN ;
68:  UALM[8] ;
69:  F[30:CellAlarm]=(ON) ;
70:  ENDIF ;
71:   ;
72:  IF (F[39:UAlarm9]) THEN ;
73:  UALM[9] ;
74:  F[30:CellAlarm]=(ON) ;
75:  ENDIF ;
76:   ;
77:  IF (F[40:UAlarm10]) THEN ;
78:  UALM[10] ;
79:  F[30:CellAlarm]=(ON) ;
80:  ENDIF ;
81:   ;
82:  IF (DI[1:LockDoorBtn] OR DI[3:ResetBtn]) THEN ;
83:  F[12:SilenceBuzzer]=(ON) ;
84:  ENDIF ;
85:   ;
/POS
/END