Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
5b512f24
Commit
5b512f24
authored
Dec 08, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plc fo SupressSup modified
parent
38429c43
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
171 additions
and
65 deletions
+171
-65
src/exe/rt_emon/src/rt_emon.c
src/exe/rt_emon/src/rt_emon.c
+24
-4
src/lib/rt/src/rt_plc_macro_logic.h
src/lib/rt/src/rt_plc_macro_logic.h
+20
-36
src/lib/rt/src/rt_plc_macro_sup.h
src/lib/rt/src/rt_plc_macro_sup.h
+45
-9
src/wbl/pwrb/src/pwrb_c_asup.wb_load
src/wbl/pwrb/src/pwrb_c_asup.wb_load
+10
-0
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
+10
-0
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
+10
-0
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
+10
-0
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
+9
-9
wb/lib/wb/src/wb_gobj.cpp
wb/lib/wb/src/wb_gobj.cpp
+33
-7
No files found.
src/exe/rt_emon/src/rt_emon.c
View file @
5b512f24
...
...
@@ -66,6 +66,7 @@
#include "co_cdh.h"
#include "co_time.h"
#include "co_tree.h"
#include "co_timelog.h"
#include "rt_ini_event.h"
#include "rt_mh_def.h"
#include "rt_mh_net.h"
...
...
@@ -1217,7 +1218,16 @@ aSup_exec (
if
(
!
o
->
Action
)
{
o
->
Action
=
TRUE
;
}
if
(
o
->
AlarmCheck
&&
o
->
DetectOn
&&
!
o
->
Blocked
)
{
if
(
o
->
Supressed
)
{
if
(
o
->
ReturnCheck
)
{
time_GetTime
(
&
o
->
ReturnTime
);
o
->
ReturnCheck
=
FALSE
;
o
->
ReturnSend
=
TRUE
;
}
else
if
(
o
->
DetectSend
)
o
->
DetectSend
=
FALSE
;
}
if
(
o
->
AlarmCheck
&&
o
->
DetectOn
&&
!
o
->
Blocked
&&
!
o
->
Supressed
)
{
if
(
o
->
DetectCheck
)
{
o
->
ActualValue
=
In
;
timerIn
(
sp
,
(
sTimer
*
)
&
o
->
TimerFlag
);
...
...
@@ -1504,7 +1514,16 @@ dSup_exec (
if
(
!
o
->
Action
)
{
o
->
Action
=
TRUE
;
}
if
(
o
->
AlarmCheck
&&
o
->
DetectOn
&&
!
o
->
Blocked
)
{
if
(
o
->
Supressed
)
{
if
(
o
->
ReturnCheck
)
{
time_GetTime
(
&
o
->
ReturnTime
);
o
->
ReturnCheck
=
FALSE
;
o
->
ReturnSend
=
TRUE
;
}
else
if
(
o
->
DetectSend
)
o
->
DetectSend
=
FALSE
;
}
if
(
o
->
AlarmCheck
&&
o
->
DetectOn
&&
!
o
->
Blocked
&&
!
o
->
Supressed
)
{
if
(
o
->
DetectCheck
)
{
o
->
ActualValue
=
In
;
timerIn
(
sp
,
(
sTimer
*
)
&
o
->
TimerFlag
);
...
...
@@ -3556,7 +3575,7 @@ outunitAck (
return
;
}
printf
(
"** Acked %s %u
\n
"
,
ap
->
objName
,
(
unsigned
int
)
ap
->
status
.
Event
.
Status
);
timelog_ss
(
4
,
"emon, acked"
,
ap
->
objName
);
switch
(
ap
->
source
)
{
case
mh_eSource_Scanner
:
...
...
@@ -3935,6 +3954,7 @@ receive (
continue
;
handleMessage
(
&
get
);
}
pwrs_Node_Exec
(
handlerEvent_cb
);
}
else
{
...
...
@@ -5370,7 +5390,7 @@ static pwr_tStatus emon_redu_receive()
case
mh_eEvent_UserAlarm4
:
break
;
default:
printf
(
"** etp type error %s %d
\n
"
,
ap
->
objName
,
ap
->
detect_etp
->
event
);
timelog_ss
(
4
,
"emon etp type error"
,
ap
->
objName
);
activep
++
;
continue
;
}
...
...
src/lib/rt/src/rt_plc_macro_logic.h
View file @
5b512f24
...
...
@@ -201,39 +201,23 @@
@aref supresssup SupressSup
*/
#define SupressSup_exec(obj,sup,cid,in)\
if ( in && !obj->InOld) {\
switch ( cid) {\
case pwr_cClass_DSup:\
((pwr_sClass_DSup *)sup)->Blocked = 1;\
break;\
case pwr_cClass_DSupComp:\
((pwr_sClass_DSupComp *)sup)->Blocked = 1;\
break;\
case pwr_cClass_ASup:\
((pwr_sClass_ASup *)sup)->Blocked = 1;\
break;\
case pwr_cClass_ASupComp:\
((pwr_sClass_ASupComp *)sup)->Blocked = 1;\
break;\
default: ;\
}\
}\
else if ( !in && obj->InOld) {\
switch ( cid) {\
case pwr_cClass_DSup:\
((pwr_sClass_DSup *)sup)->Blocked = 0;\
break;\
case pwr_cClass_DSupComp:\
((pwr_sClass_DSupComp *)sup)->Blocked = 0;\
break;\
case pwr_cClass_ASup:\
((pwr_sClass_ASup *)sup)->Blocked = 0;\
break;\
case pwr_cClass_ASupComp:\
((pwr_sClass_ASupComp *)sup)->Blocked = 0;\
break;\
default: ;\
}\
}\
obj->Supressed = in;\
obj->InOld = in;
switch ( cid) { \
case pwr_cClass_DSup: \
((pwr_sClass_DSup *)sup)->Supressed = in; \
obj->Out = in || ((pwr_sClass_DSup *)sup)->Action; \
break; \
case pwr_cClass_DSupComp: \
((pwr_sClass_DSupComp *)sup)->Supressed = in; \
obj->Out = in || ((pwr_sClass_DSupComp *)sup)->Action; \
break; \
case pwr_cClass_ASup: \
((pwr_sClass_ASup *)sup)->Supressed = in; \
obj->Out = in || ((pwr_sClass_ASup *)sup)->Action; \
break; \
case pwr_cClass_ASupComp: \
((pwr_sClass_ASupComp *)sup)->Supressed = in; \
obj->Out = in || ((pwr_sClass_ASupComp *)sup)->Action; \
break; \
default: ; \
} \
obj->Supressed = in;
src/lib/rt/src/rt_plc_macro_sup.h
View file @
5b512f24
...
...
@@ -104,7 +104,16 @@
((o->High && In > o->CtrlLimit) || \
(!o->High && In < o->CtrlLimit))) { \
if (!o->Action) o->Action = TRUE; \
if (o->AlarmCheck && o->DetectOn && !o->Blocked) { \
if (o->Supressed) { \
if (o->ReturnCheck) { \
time_GetTime( &o->ReturnTime); \
o->ReturnCheck = FALSE; \
o->ReturnSend = TRUE; \
} \
else if (o->DetectSend) \
o->DetectSend = FALSE; \
} \
if (o->AlarmCheck && o->DetectOn && !o->Blocked && !o->Supressed) { \
if (o->DetectCheck) { \
o->ActualValue = In; \
timer2_in(tp, o); \
...
...
@@ -119,7 +128,7 @@
} \
} \
} \
if (o->Blocked
) {
\
if (o->Blocked
|| o->Supressed) {
\
o->TimerCount = 0; \
o->DetectCheck = TRUE; \
}
...
...
@@ -164,7 +173,16 @@
} \
} else if (con) { \
if (!o->Action) o->Action = TRUE; \
if (o->AlarmCheck && o->DetectOn && !o->Blocked) { \
if (o->Supressed) { \
if (o->ReturnCheck) { \
time_GetTime( &o->ReturnTime); \
o->ReturnCheck = FALSE; \
o->ReturnSend = TRUE; \
} \
else if (o->DetectSend) \
o->DetectSend = FALSE; \
} \
if (o->AlarmCheck && o->DetectOn && !o->Blocked && !o->Supressed) { \
if (o->DetectCheck) { \
o->ActualValue = In; \
timer2_in(tp, o); \
...
...
@@ -179,7 +197,7 @@
} \
} \
} \
if (o->Blocked
) {
\
if (o->Blocked
|| o->Supressed) {
\
o->TimerCount = 0; \
o->DetectCheck = TRUE; \
}
...
...
@@ -224,7 +242,16 @@
}\
} else if (con) {\
if (!co->Action) co->Action = TRUE;\
if (co->AlarmCheck && co->DetectOn && !co->Blocked) {\
if (co->Supressed) {\
if (co->ReturnCheck) {\
time_GetTime( &co->ReturnTime);\
co->ReturnCheck = FALSE;\
co->ReturnSend = TRUE;\
}\
else if (co->DetectSend)\
co->DetectSend = FALSE;\
}\
if (co->AlarmCheck && co->DetectOn && !co->Blocked && !co->Supressed) {\
if (co->DetectCheck) {\
co->ActualValue = In;\
timer2_in(tp, co);\
...
...
@@ -239,7 +266,7 @@
}\
}\
}\
if (co->Blocked) {\
if (co->Blocked
|| co->Supressed
) {\
co->TimerCount = 0;\
co->DetectCheck = TRUE;\
}\
...
...
@@ -292,7 +319,16 @@
((co->High && In > co->CtrlLimit) ||\
(!co->High && In < co->CtrlLimit))) {\
if (!co->Action) co->Action = TRUE;\
if (co->AlarmCheck && co->DetectOn && !co->Blocked) {\
if (co->Supressed) {\
if (co->ReturnCheck) {\
time_GetTime( &co->ReturnTime);\
co->ReturnCheck = FALSE;\
co->ReturnSend = TRUE;\
}\
else if (co->DetectSend)\
co->DetectSend = FALSE;\
}\
if (co->AlarmCheck && co->DetectOn && !co->Blocked && !co->Supressed) {\
if (co->DetectCheck) {\
co->ActualValue = In;\
timer2_in(tp, co);\
...
...
@@ -307,7 +343,7 @@
}\
}\
}\
if (co->Blocked) {\
if (co->Blocked
|| co->Supressed
) {\
co->TimerCount = 0;\
co->DetectCheck = TRUE;\
}\
...
...
src/wbl/pwrb/src/pwrb_c_asup.wb_load
View file @
5b512f24
...
...
@@ -589,6 +589,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$String16"
EndBody
EndObject
!/**
! Used by the SupressSup object to supress the alarm.
!*/
Object Supressed $Attribute 42
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!
! End of ASup inf struct
! --
...
...
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
View file @
5b512f24
...
...
@@ -571,6 +571,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$String16"
EndBody
EndObject
!/**
! Used by the SupressSup object to supress the alarm.
!*/
Object Supressed $Attribute 44
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!
! End of ASup inf struct
! --
...
...
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
View file @
5b512f24
...
...
@@ -553,6 +553,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! Used by the SupressSup object to supress the alarm.
!*/
Object Supressed $Attribute 39
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!
! End of DSup inf struct
! --
...
...
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
View file @
5b512f24
...
...
@@ -536,6 +536,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! Used by the SupressSup object to supress the alarm.
!*/
Object Supressed $Attribute 41
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!
! End of DSup inf struct
! --
...
...
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
View file @
5b512f24
...
...
@@ -44,7 +44,7 @@ SObject pwrb:Class
! @image orm_supresssup_fo.gif
!
!*/
Object SupressSup $ClassDef 6
86
Object SupressSup $ClassDef 6
90
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtConnectionsAndDevBodies
...
...
@@ -69,21 +69,21 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Value of In from last scan
.
!
Indicating that alarm is supressed
.
!*/
Object
InOl
d $Intern 2
Object
Supresse
d $Intern 2
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr PgmName = "Supressed"
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! Output indicating that alarm is supressed.
! Output indicating that alarm is supressed or the associated
! alarm is active.
!*/
Object
Supressed
$Output 3
Object
Out
$Output 3
Body SysBody
Attr PgmName = "
Supressed
"
Attr PgmName = "
Out
"
Attr TypeRef = "pwrs:Type-$Boolean"
Attr GraphName = "out"
EndBody
...
...
@@ -141,7 +141,7 @@ SObject pwrb:Class
Attr connectmethod = 36
Attr executeordermethod = 6
Attr objname = "SupressSup"
Attr graphname = "SupSup"
Attr graphname = "Sup
ress
Sup"
Attr debugpar = "Supressed"
EndBody
EndObject
...
...
wb/lib/wb/src/wb_gobj.cpp
View file @
5b512f24
...
...
@@ -3177,18 +3177,44 @@ int gobj_get_object_m36( WFoe *foe, vldh_t_node node, unsigned long index)
vldh_t_plc
plc
;
pwr_sAttrRef
attrref
;
int
is_attr
;
unsigned
long
node_count
;
vldh_t_node
*
nodelist
;
vldh_t_node
object
;
/* Get the selected object in the navigator */
plc
=
(
node
->
hn
.
wind
)
->
hw
.
plc
;
ldhses
=
(
node
->
hn
.
wind
)
->
hw
.
ldhses
;
/* Get the selected object in current plc window or the navigator */
foe
->
gre
->
get_selnodes
(
&
node_count
,
&
nodelist
);
if
(
((
node_count
==
1
)
&&
(
*
nodelist
==
node
))
||
(
node_count
==
0
)
)
{
/* Take the orderobject from the navigator */
sts
=
gobj_get_select
(
foe
,
&
attrref
,
&
is_attr
);
if
(
EVEN
(
sts
))
{
foe
->
message
(
"Select a supervision object in the navigator
"
);
foe
->
message
(
"Select a supervision object in the navigator or in the current window
"
);
BEEP
;
return
sts
;
}
}
else
if
(
(
node_count
==
2
)
&&
((
*
nodelist
==
node
)
||
(
*
(
nodelist
+
1
)
==
node
)))
{
if
(
*
nodelist
==
node
)
object
=
*
(
nodelist
+
1
);
else
object
=
*
nodelist
;
attrref
=
cdh_ObjidToAref
(
object
->
ln
.
oid
);
}
else
if
(
node_count
==
1
)
{
object
=
*
nodelist
;
attrref
=
cdh_ObjidToAref
(
object
->
ln
.
oid
);
}
else
{
foe
->
message
(
"Select a supervision object in the navigator or in the current window first"
);
BEEP
;
return
0
;
}
if
(
node_count
>
0
)
free
((
char
*
)
nodelist
);
sts
=
ldh_GetAttrRefTid
(
ldhses
,
&
attrref
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -3200,7 +3226,7 @@ int gobj_get_object_m36( WFoe *foe, vldh_t_node node, unsigned long index)
case
pwr_cClass_ASupComp
:
break
;
default:
foe
->
message
(
"Selected object is not a
di
object"
);
foe
->
message
(
"Selected object is not a
supervision
object"
);
BEEP
;
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment