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 @@
...
@@ -66,6 +66,7 @@
#include "co_cdh.h"
#include "co_cdh.h"
#include "co_time.h"
#include "co_time.h"
#include "co_tree.h"
#include "co_tree.h"
#include "co_timelog.h"
#include "rt_ini_event.h"
#include "rt_ini_event.h"
#include "rt_mh_def.h"
#include "rt_mh_def.h"
#include "rt_mh_net.h"
#include "rt_mh_net.h"
...
@@ -1217,7 +1218,16 @@ aSup_exec (
...
@@ -1217,7 +1218,16 @@ aSup_exec (
if
(
!
o
->
Action
)
{
if
(
!
o
->
Action
)
{
o
->
Action
=
TRUE
;
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
)
{
if
(
o
->
DetectCheck
)
{
o
->
ActualValue
=
In
;
o
->
ActualValue
=
In
;
timerIn
(
sp
,
(
sTimer
*
)
&
o
->
TimerFlag
);
timerIn
(
sp
,
(
sTimer
*
)
&
o
->
TimerFlag
);
...
@@ -1504,7 +1514,16 @@ dSup_exec (
...
@@ -1504,7 +1514,16 @@ dSup_exec (
if
(
!
o
->
Action
)
{
if
(
!
o
->
Action
)
{
o
->
Action
=
TRUE
;
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
)
{
if
(
o
->
DetectCheck
)
{
o
->
ActualValue
=
In
;
o
->
ActualValue
=
In
;
timerIn
(
sp
,
(
sTimer
*
)
&
o
->
TimerFlag
);
timerIn
(
sp
,
(
sTimer
*
)
&
o
->
TimerFlag
);
...
@@ -3556,7 +3575,7 @@ outunitAck (
...
@@ -3556,7 +3575,7 @@ outunitAck (
return
;
return
;
}
}
printf
(
"** Acked %s %u
\n
"
,
ap
->
objName
,
(
unsigned
int
)
ap
->
status
.
Event
.
Status
);
timelog_ss
(
4
,
"emon, acked"
,
ap
->
objName
);
switch
(
ap
->
source
)
{
switch
(
ap
->
source
)
{
case
mh_eSource_Scanner
:
case
mh_eSource_Scanner
:
...
@@ -3935,6 +3954,7 @@ receive (
...
@@ -3935,6 +3954,7 @@ receive (
continue
;
continue
;
handleMessage
(
&
get
);
handleMessage
(
&
get
);
}
}
pwrs_Node_Exec
(
handlerEvent_cb
);
}
}
else
{
else
{
...
@@ -5370,7 +5390,7 @@ static pwr_tStatus emon_redu_receive()
...
@@ -5370,7 +5390,7 @@ static pwr_tStatus emon_redu_receive()
case
mh_eEvent_UserAlarm4
:
case
mh_eEvent_UserAlarm4
:
break
;
break
;
default:
default:
printf
(
"** etp type error %s %d
\n
"
,
ap
->
objName
,
ap
->
detect_etp
->
event
);
timelog_ss
(
4
,
"emon etp type error"
,
ap
->
objName
);
activep
++
;
activep
++
;
continue
;
continue
;
}
}
...
...
src/lib/rt/src/rt_plc_macro_logic.h
View file @
5b512f24
...
@@ -201,39 +201,23 @@
...
@@ -201,39 +201,23 @@
@aref supresssup SupressSup
@aref supresssup SupressSup
*/
*/
#define SupressSup_exec(obj,sup,cid,in)\
#define SupressSup_exec(obj,sup,cid,in)\
if ( in && !obj->InOld) {\
switch ( cid) { \
switch ( cid) {\
case pwr_cClass_DSup: \
case pwr_cClass_DSup:\
((pwr_sClass_DSup *)sup)->Supressed = in; \
((pwr_sClass_DSup *)sup)->Blocked = 1;\
obj->Out = in || ((pwr_sClass_DSup *)sup)->Action; \
break;\
break; \
case pwr_cClass_DSupComp:\
case pwr_cClass_DSupComp: \
((pwr_sClass_DSupComp *)sup)->Blocked = 1;\
((pwr_sClass_DSupComp *)sup)->Supressed = in; \
break;\
obj->Out = in || ((pwr_sClass_DSupComp *)sup)->Action; \
case pwr_cClass_ASup:\
break; \
((pwr_sClass_ASup *)sup)->Blocked = 1;\
case pwr_cClass_ASup: \
break;\
((pwr_sClass_ASup *)sup)->Supressed = in; \
case pwr_cClass_ASupComp:\
obj->Out = in || ((pwr_sClass_ASup *)sup)->Action; \
((pwr_sClass_ASupComp *)sup)->Blocked = 1;\
break; \
break;\
case pwr_cClass_ASupComp: \
default: ;\
((pwr_sClass_ASupComp *)sup)->Supressed = in; \
}\
obj->Out = in || ((pwr_sClass_ASupComp *)sup)->Action; \
}\
break; \
else if ( !in && obj->InOld) {\
default: ; \
switch ( cid) {\
} \
case pwr_cClass_DSup:\
obj->Supressed = in;
((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;
src/lib/rt/src/rt_plc_macro_sup.h
View file @
5b512f24
...
@@ -104,7 +104,16 @@
...
@@ -104,7 +104,16 @@
((o->High && In > o->CtrlLimit) || \
((o->High && In > o->CtrlLimit) || \
(!o->High && In < o->CtrlLimit))) { \
(!o->High && In < o->CtrlLimit))) { \
if (!o->Action) o->Action = TRUE; \
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) { \
if (o->DetectCheck) { \
o->ActualValue = In; \
o->ActualValue = In; \
timer2_in(tp, o); \
timer2_in(tp, o); \
...
@@ -119,7 +128,7 @@
...
@@ -119,7 +128,7 @@
} \
} \
} \
} \
} \
} \
if (o->Blocked
) {
\
if (o->Blocked
|| o->Supressed) {
\
o->TimerCount = 0; \
o->TimerCount = 0; \
o->DetectCheck = TRUE; \
o->DetectCheck = TRUE; \
}
}
...
@@ -164,7 +173,16 @@
...
@@ -164,7 +173,16 @@
} \
} \
} else if (con) { \
} else if (con) { \
if (!o->Action) o->Action = TRUE; \
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) { \
if (o->DetectCheck) { \
o->ActualValue = In; \
o->ActualValue = In; \
timer2_in(tp, o); \
timer2_in(tp, o); \
...
@@ -179,7 +197,7 @@
...
@@ -179,7 +197,7 @@
} \
} \
} \
} \
} \
} \
if (o->Blocked
) {
\
if (o->Blocked
|| o->Supressed) {
\
o->TimerCount = 0; \
o->TimerCount = 0; \
o->DetectCheck = TRUE; \
o->DetectCheck = TRUE; \
}
}
...
@@ -224,7 +242,16 @@
...
@@ -224,7 +242,16 @@
}\
}\
} else if (con) {\
} else if (con) {\
if (!co->Action) co->Action = TRUE;\
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) {\
if (co->DetectCheck) {\
co->ActualValue = In;\
co->ActualValue = In;\
timer2_in(tp, co);\
timer2_in(tp, co);\
...
@@ -239,7 +266,7 @@
...
@@ -239,7 +266,7 @@
}\
}\
}\
}\
}\
}\
if (co->Blocked) {\
if (co->Blocked
|| co->Supressed
) {\
co->TimerCount = 0;\
co->TimerCount = 0;\
co->DetectCheck = TRUE;\
co->DetectCheck = TRUE;\
}\
}\
...
@@ -292,7 +319,16 @@
...
@@ -292,7 +319,16 @@
((co->High && In > co->CtrlLimit) ||\
((co->High && In > co->CtrlLimit) ||\
(!co->High && In < co->CtrlLimit))) {\
(!co->High && In < co->CtrlLimit))) {\
if (!co->Action) co->Action = TRUE;\
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) {\
if (co->DetectCheck) {\
co->ActualValue = In;\
co->ActualValue = In;\
timer2_in(tp, co);\
timer2_in(tp, co);\
...
@@ -307,7 +343,7 @@
...
@@ -307,7 +343,7 @@
}\
}\
}\
}\
}\
}\
if (co->Blocked) {\
if (co->Blocked
|| co->Supressed
) {\
co->TimerCount = 0;\
co->TimerCount = 0;\
co->DetectCheck = TRUE;\
co->DetectCheck = TRUE;\
}\
}\
...
...
src/wbl/pwrb/src/pwrb_c_asup.wb_load
View file @
5b512f24
...
@@ -589,6 +589,16 @@ SObject pwrb:Class
...
@@ -589,6 +589,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$String16"
Attr TypeRef = "pwrs:Type-$String16"
EndBody
EndBody
EndObject
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
! End of ASup inf struct
! --
! --
...
...
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
View file @
5b512f24
...
@@ -571,6 +571,16 @@ SObject pwrb:Class
...
@@ -571,6 +571,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$String16"
Attr TypeRef = "pwrs:Type-$String16"
EndBody
EndBody
EndObject
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
! End of ASup inf struct
! --
! --
...
...
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
View file @
5b512f24
...
@@ -553,6 +553,16 @@ SObject pwrb:Class
...
@@ -553,6 +553,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Boolean"
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndBody
EndObject
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
! End of DSup inf struct
! --
! --
...
...
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
View file @
5b512f24
...
@@ -536,6 +536,16 @@ SObject pwrb:Class
...
@@ -536,6 +536,16 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Boolean"
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndBody
EndObject
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
! End of DSup inf struct
! --
! --
...
...
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
View file @
5b512f24
...
@@ -44,7 +44,7 @@ SObject pwrb:Class
...
@@ -44,7 +44,7 @@ SObject pwrb:Class
! @image orm_supresssup_fo.gif
! @image orm_supresssup_fo.gif
!
!
!*/
!*/
Object SupressSup $ClassDef 6
86
Object SupressSup $ClassDef 6
90
Body SysBody
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtConnectionsAndDevBodies
Attr Method = pwr_eMethod_RtConnectionsAndDevBodies
...
@@ -69,21 +69,21 @@ SObject pwrb:Class
...
@@ -69,21 +69,21 @@ SObject pwrb:Class
EndBody
EndBody
EndObject
EndObject
!/**
!/**
!
Value of In from last scan
.
!
Indicating that alarm is supressed
.
!*/
!*/
Object
InOl
d $Intern 2
Object
Supresse
d $Intern 2
Body SysBody
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr PgmName = "Supressed"
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndBody
EndObject
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
Body SysBody
Attr PgmName = "
Supressed
"
Attr PgmName = "
Out
"
Attr TypeRef = "pwrs:Type-$Boolean"
Attr TypeRef = "pwrs:Type-$Boolean"
Attr GraphName = "out"
Attr GraphName = "out"
EndBody
EndBody
...
@@ -141,7 +141,7 @@ SObject pwrb:Class
...
@@ -141,7 +141,7 @@ SObject pwrb:Class
Attr connectmethod = 36
Attr connectmethod = 36
Attr executeordermethod = 6
Attr executeordermethod = 6
Attr objname = "SupressSup"
Attr objname = "SupressSup"
Attr graphname = "SupSup"
Attr graphname = "Sup
ress
Sup"
Attr debugpar = "Supressed"
Attr debugpar = "Supressed"
EndBody
EndBody
EndObject
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)
...
@@ -3177,18 +3177,44 @@ int gobj_get_object_m36( WFoe *foe, vldh_t_node node, unsigned long index)
vldh_t_plc
plc
;
vldh_t_plc
plc
;
pwr_sAttrRef
attrref
;
pwr_sAttrRef
attrref
;
int
is_attr
;
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
;
plc
=
(
node
->
hn
.
wind
)
->
hw
.
plc
;
ldhses
=
(
node
->
hn
.
wind
)
->
hw
.
ldhses
;
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
);
sts
=
gobj_get_select
(
foe
,
&
attrref
,
&
is_attr
);
if
(
EVEN
(
sts
))
{
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
;
BEEP
;
return
sts
;
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
);
sts
=
ldh_GetAttrRefTid
(
ldhses
,
&
attrref
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
...
@@ -3200,7 +3226,7 @@ int gobj_get_object_m36( WFoe *foe, vldh_t_node node, unsigned long index)
...
@@ -3200,7 +3226,7 @@ int gobj_get_object_m36( WFoe *foe, vldh_t_node node, unsigned long index)
case
pwr_cClass_ASupComp
:
case
pwr_cClass_ASupComp
:
break
;
break
;
default:
default:
foe
->
message
(
"Selected object is not a
di
object"
);
foe
->
message
(
"Selected object is not a
supervision
object"
);
BEEP
;
BEEP
;
return
0
;
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