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
0959114d
Commit
0959114d
authored
Nov 22, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simulink interface added and function object SupressSup
parent
69b3ff60
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1054 additions
and
6 deletions
+1054
-6
simul/wbl/simul/src/simul.wb_load
simul/wbl/simul/src/simul.wb_load
+419
-2
src/doc/orm/src/orm_simulink_fo.png
src/doc/orm/src/orm_simulink_fo.png
+0
-0
src/lib/rt/src/rt_plc_macro_logic.h
src/lib/rt/src/rt_plc_macro_logic.h
+41
-1
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
+156
-0
wb/exp/wb/src/pwr_wb_palette.cnf
wb/exp/wb/src/pwr_wb_palette.cnf
+2
-0
wb/lib/wb/src/wb_gcg.cpp
wb/lib/wb/src/wb_gcg.cpp
+374
-2
wb/lib/wb/src/wb_gobj.cpp
wb/lib/wb/src/wb_gobj.cpp
+62
-1
No files found.
simul/wbl/simul/src/simul.wb_load
View file @
0959114d
This diff is collapsed.
Click to expand it.
src/doc/orm/src/orm_simulink_fo.png
0 → 100644
View file @
0959114d
1.74 KB
src/lib/rt/src/rt_plc_macro_logic.h
View file @
0959114d
...
...
@@ -191,4 +191,44 @@
obj->Status = false; \
}
/*_*
SUPRESSSUP
@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;
src/wbl/pwrb/src/pwrb_c_supresssup.wb_load
0 → 100644
View file @
0959114d
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2016 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_supresssup.wb_load -- Defines the class SupressSup.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Code rt_plc_macro_io.h
! @Summary Object to suppress alarms.
! Object to supress alarm.
! @image orm_supresssup_fo.gif
!
!*/
Object SupressSup $ClassDef 686
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtConnectionsAndDevBodies
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "SupressSup"
EndBody
!/**
! Digital input to supress the alarm.
! When In is high, the alarm is supressed.
!*/
Object In $Input 1
Body SysBody
Attr PgmName = "In"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_RTVIRTUAL
Attr Flags |= PWR_MASK_NOREMOVE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
Attr GraphName = "in"
EndBody
EndObject
!/**
! Value of In from last scan.
!*/
Object InOld $Intern 2
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! Output indicating that alarm is supressed.
!*/
Object Supressed $Output 3
Body SysBody
Attr PgmName = "Supressed"
Attr TypeRef = "pwrs:Type-$Boolean"
Attr GraphName = "out"
EndBody
EndObject
EndObject
Object DevBody $ObjBodyDef 2
!/**
! The supervision object for the alarm.
! An object of class DSup, DSupComp, ASup or ASupComp.
!*/
Object SupObject $Intern 1
Body SysBody
Attr TypeRef = "pwrs:Type-$AttrRef"
Attr NiNaAnnot = 1
Attr NiNaSegments = 1
EndBody
EndObject
!/**
! Specifies how many segments of the Sup object name that
! is to be displayed in the symbol of the ResDi object.
! The segments are counted from behind.
! 0 and 1 both result in displaying the last segment of
! the signal object name.
!*/
Object SupObjectSegments $Intern 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
EndBody
EndObject
Object PlcNode $Buffer 3
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 1
Attr parameters[1] = 1
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 7
Attr graphindex = 1
Attr default_mask[0] = 1
Attr default_mask[1] = 0
Attr segname_annotation = 0
Attr devbody_annotation = 1
Attr compmethod = 70
Attr compindex = 0
Attr tracemethod = 1
Attr traceindex = 1
Attr connectmethod = 36
Attr executeordermethod = 6
Attr objname = "SupressSup"
Attr graphname = "SupSup"
Attr debugpar = "Supressed"
EndBody
EndObject
Object Template SupressSup
Body RtBody
EndBody
Body DevBody
Attr SupObjectSegments = 3
EndBody
EndObject
EndObject
EndSObject
wb/exp/wb/src/pwr_wb_palette.cnf
View file @
0959114d
...
...
@@ -879,6 +879,7 @@ palette PlcEditorPalette
class PulseTrain
class SR_R
class SR_S
class SupressSup
class Timer
class True
class Wait
...
...
@@ -1204,6 +1205,7 @@ palette PlcEditorPalette
class Sim_LagFilter
class Sim_LeadLagFilter
class Sim_SigGen
class Sim_Simulink
class Sim_SlewRateLimiter
class Sim_SouFilter
class Sim_SouTOoFilter
...
...
wb/lib/wb/src/wb_gcg.cpp
View file @
0959114d
This diff is collapsed.
Click to expand it.
wb/lib/wb/src/wb_gobj.cpp
View file @
0959114d
...
...
@@ -58,7 +58,7 @@
#define BEEP putchar( '\7' );
#define GOBJ_MAX_METHOD 3
5
#define GOBJ_MAX_METHOD 3
6
typedef
int
(
*
gobj_tMethod
)(
WFoe
*
,
vldh_t_node
,
unsigned
long
);
...
...
@@ -98,6 +98,7 @@ int gobj_get_object_m32( WFoe *foe, vldh_t_node node, unsigned long index);
int
gobj_get_object_m33
(
WFoe
*
foe
,
vldh_t_node
node
,
unsigned
long
index
);
int
gobj_get_object_m34
(
WFoe
*
foe
,
vldh_t_node
node
,
unsigned
long
index
);
int
gobj_get_object_m35
(
WFoe
*
foe
,
vldh_t_node
node
,
unsigned
long
index
);
int
gobj_get_object_m36
(
WFoe
*
foe
,
vldh_t_node
node
,
unsigned
long
index
);
gobj_tMethod
gobj_get_object_m
[
40
]
=
{
gobj_get_object_m0
,
...
...
@@ -136,6 +137,7 @@ gobj_tMethod gobj_get_object_m[40] = {
gobj_get_object_m33
,
gobj_get_object_m34
,
gobj_get_object_m35
,
gobj_get_object_m36
,
};
static
pwr_tAttrRef
gobj_selected_aref
;
...
...
@@ -3163,6 +3165,64 @@ int gobj_get_object_m35( WFoe *foe, vldh_t_node node, unsigned long index)
return
FOE__SUCCESS
;
}
//
// Method for SupressSup. Inserts the selected Sup-object in the
// navigator in the parameter SupObject in a SupressSup object.
//
int
gobj_get_object_m36
(
WFoe
*
foe
,
vldh_t_node
node
,
unsigned
long
index
)
{
pwr_tClassId
cid
;
ldh_tSesContext
ldhses
;
int
sts
;
vldh_t_plc
plc
;
pwr_sAttrRef
attrref
;
int
is_attr
;
/* Get the selected object in the navigator */
plc
=
(
node
->
hn
.
wind
)
->
hw
.
plc
;
ldhses
=
(
node
->
hn
.
wind
)
->
hw
.
ldhses
;
sts
=
gobj_get_select
(
foe
,
&
attrref
,
&
is_attr
);
if
(
EVEN
(
sts
))
{
foe
->
message
(
"Select a supervision object in the navigator"
);
BEEP
;
return
sts
;
}
sts
=
ldh_GetAttrRefTid
(
ldhses
,
&
attrref
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
switch
(
cid
)
{
case
pwr_cClass_DSup
:
case
pwr_cClass_ASup
:
case
pwr_cClass_DSupComp
:
case
pwr_cClass_ASupComp
:
break
;
default:
foe
->
message
(
"Selected object is not a di object"
);
BEEP
;
return
0
;
}
if
(
cdh_IsClassVolume
(
node
->
ln
.
oid
.
vid
))
{
sts
=
gobj_ref_replace
(
ldhses
,
node
,
&
attrref
);
if
(
EVEN
(
sts
))
return
sts
;
}
/* Set the parameter value */
sts
=
ldh_SetObjectPar
(
ldhses
,
node
->
ln
.
oid
,
"DevBody"
,
"SupObject"
,
(
char
*
)
&
attrref
,
sizeof
(
attrref
));
if
(
EVEN
(
sts
))
return
sts
;
foe
->
gre
->
node_update
(
node
);
return
FOE__SUCCESS
;
}
//
// Description: Method for objects with nothing to expand
//
...
...
@@ -3246,6 +3306,7 @@ int gobj_expand( WFoe *foe,
case
pwr_cClass_GetBoInt32
:
case
pwr_cClass_GetBoFloat32
:
case
pwr_cClass_GetBoString80
:
case
pwr_cClass_SupressSup
:
sts
=
gobj_expand_m1
(
foe
,
node
,
compress
);
break
;
case
pwr_cClass_and
:
...
...
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