In the depth of UNICOS … How to create a new package

In the depth of
UNICOS …
How to create a new package
Hervé Milcent EN/ICE
Outline
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description
1.
2.
3.
4.








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
2
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description
1.
2.
3.
4.








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
3
Preliminary





UNICOS: primary for cryogenics control
Process control in the front-end
Process supervision with a SCADA
Keeping in mind:
 Development of user interface by operators
 Less work as possible for the developer (non SCADA expert)
 Control system as a whole (abstraction of SCADA & front-end)
UNICOS:
 SCADA:



UNICORE: unCore, unLHCServices
Based on PVSS & JCOP
Front-end:

UNICORE: TSPP protocol
November 19th 2009
UNICOS in depth
4
UNICOS framework: Package

Package


Extend UNICORE to a specific domain
Set of components combined/configured together
 Ex: Device component, utilities, etc.
Supervision
layer
U
N
I
C
O
S
November 19th 2009
UNICOS
CPC package
Application
Application A
packages
(PIC, ..)
PLCs CPC
PLCs
(non CPC)
Application
packages
(QPS, SURVEY, ..)
UNICORE
Control
layer
UNICOS in depth
FECs
(FESA)
5
UNICOS framework: application

Set of package combined and configured
together to produce control/monitoring
application
LHC GCS
Supervision
layer
U
N
I
C
O
S
LHC
Cryogenics
UNICORE
Control
layer
November 19th 2009
UNICOS
CPC package
PLCs CPC
UNICOS in depth
6
Do not forget …

Process control in the front-end & Process
supervision with a SCADA & less work as possible
for the developer (non SCADA expert)



Development of user interface by operators


Link between Front-end & SCADA from a unique source
No manual configuration
Building synoptics with drag & drop features
Control system as a whole (abstraction of SCADA &
front-end)




User: little or no SCADA knowledge
Errors in log =>useless
Handle remote system as is local
All the relevant information on data quality in one shot
November 19th 2009
UNICOS in depth
7
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description
1.
2.
3.
4.








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
8
Concept ….

Based on front-end device:



And device:





PLC, FEC, OPC, Soft Front-end, etc.
With or without hardware link
Analog Input, Digital Input, etc.
With or without hardware link
Attached to one and only one front-end
The unCore will trigger your device functions
Placeholder in well defined places

Lib functions & panels
November 19th 2009
UNICOS in depth
9
Some rules …


No use of PARA module by application developer, operators
Device configuration:







Import utility
Device configuration utility: device DPE configs, etc.
GEDI just for to create the user panels (synoptics)
Easy & understandable 
Diagnostic
Configuration
Intensive use of

DistributedControl component: check the connection/disconnection of
remote system



DistributedControl callback functions
Can use variables global to the panels, libs, even without the global
keyword
evalScript and execScript

Be careful with global variables (in panels, libs, etc.), $-param
November 19th 2009
UNICOS in depth
10
unCore: concept …

Import: mass configuration



Export:


Export device configuration
Widget: summarized view of the device
data


Import device configuration
Delete device configuration
as many as needed
Faceplate: detail view of the device data

Just one

Many device trend configuration

Device action interface


Action on the device
Device access control


4 privileges, many domains
File access control

3 privileges, many domains
November 19th 2009
UNICOS in depth
11
Naming & hierarchies …

Device – front-end device name: logical name of the device, PVSS alias
 ‘:’ not allowed, is the PVSS system name separator
 PVSSsystemName:PVSSAlias Ex:
DFBA_CV981,
MB.A12R3,
P8_82:DFBA_CV981,
QPS_34:MB.A12R3

Device – front-end device DP name: hardware name of the device, PVSS DP
name
 PVSSsystemName:prefix-fe-application-deviceType-xxxxx
 A…Z and 0…9 allowed characters
 ‘-’ as separator, ‘:’ is the PVSS system name separator
 Ex:
un-CFP_SHC8_LHC8-QSCB-Analog-00123,
qps-CFC_SR3_DR3BC_IP3_DR3B-A34-DQAMCMB-10320,
P8_82:un-CFP_SHC8_LHC8-QSCB-Analog-00123,
QPS_34:qps-CFC_SR3_DR3BC_IP3_DR3B-A34-DQAMCMB-10320
November 19th 2009
UNICOS in depth
12
Link & proxy …

Link: device can be linked together






Link between UNICOS devices: relationship between devices
 Ex: PID linked to AnalogInput
Unidirectional or bi-directional link
Device can have access to the linked device
No UNICOS device type limitation, as many as needed
Linked device not configured with the device config during the import phase
Proxy: device & front-end device as a proxy for non-UNICOS device







Allow non UNICOS device to be seen by UNICOS utilities
 Import/export
 Trending
 Widget, faceplate, device action
Integration of JCOP device into UNICOS
 Ex: UnFwElmb_AI UNICOS device proxy of FwElmbAi device (JCOP)
Unidirectional link: UNICOS device  proxy devices
Proxy of only configured types, as many as needed
Proxy can be also with UNICOS device type
Proxy device can be created and configured during the import phase with the
device
Proxy in the same system as the device
November 19th 2009
UNICOS in depth
13
systemIntegrity: concept



Checks the integrity of an application
Interface to add new type of integrity check
Periodic check of the front-end state



Callback on errors, front-end DPE, etc.
Create one or many _UnSystemAlarm devices


Check of alive counter
Use different value for different problem, not the same for
many different problems  diagnostic easier
systemIntegrity component


Configuration of the component
Component:
 PVSS libs
 Configuration panel
 Operation panel
November 19th 2009
UNICOS in depth
14
Front-end device and device


Device type
Set of libraries




Recommended solution: load via the config file
“#uses keyword”
Set of panels
Configuration
November 19th 2009
UNICOS in depth
15
Front-end device

Represents a real or soft front-end holding devices







E.g.: OPC Server, MODBUS PLC, FEC, SIEMENS PLC, etc.
Can have many devices grouped by
 Application: device grouped together to build a control
application (historical, comes from cryogenics first
implementation)
 Device type
 Number from 00000 to 99999
Device data through the front-end communication link
 Quality of the front-end link
 systemIntegrity
Widget, faceplate, access control via file access control
Many trending configuration
Proxy allowed
No link with device
November 19th 2009
UNICOS in depth
16
Device

Represents a piece of hardware or software entity




Belongs to one and only one front-end in one and
only one application
Widget, faceplate, device action, device access
control
Device can be selected:






E.g.: AnalogInput, etc.
exclusive lock
No action allowed if not selected
Automatic de-selection
Many trending configuration
Link allowed
Proxy allowed
November 19th 2009
UNICOS in depth
17
Grouping devices

Hardware by device DP name



subsystem1 (domain in UNICOS vocabulary)
subsystem2 (nature in UNICOS vocabulary)


Device  device type  application  front-end
Sub group of subsystem1
Device  one or many subsystem2  one or
many subsystem1
November 19th 2009
UNICOS in depth
18
Test





All panels, libs with different conditions
All possible errors
All possible cases
With simulated values
Document describing the tests
November 19th 2009
UNICOS in depth
19
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
20
Modification in a package

Device component: any device UNICOS
configuration





Widget behavior
Device action behavior
Import/export
Etc.
Must be discussed and checked with the
responsible of the package
November 19th 2009
UNICOS in depth
21
Add: device for new front-end,
front-end with new device

Import/export




Device imported with new front-end
Device for new front-end
Device configuration can be different
See corresponding slide on check, delete,
import, export
November 19th 2009
UNICOS in depth
22
Add new widget in a package


Must be discussed and checked with the
responsible of the package
See corresponding slide on widget




Create a new widget
Add it into the catalog
Modify the device functions
test it (see slide on testing)
November 19th 2009
UNICOS in depth
23
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
24
New package: for which purpose

Exiting device with new front-end



Existing front-end with new device



See slides on front-end import/export
See slides on device front-end import/export
See slides on adding a device
New front-end and new device
New utilities
November 19th 2009
UNICOS in depth
25
New package: do not forget!

If you overwrite a package setting




Your package must be always re-installed after an
installation
Dependency between packages
A package is not an application
A package can contains a customized HMI


Recommended to configure the provided HMI
See doc: UNICOS-HMI.pdf
November 19th 2009
UNICOS in depth
26
New front-end & new device

Create the front-end
Create the front-end system integrity component
Create the device
Test it
Package the development

Note:






a front-end device is less configurable than a device
Some of the functions are based on a strict naming
convention based on the device type and/or front-end type
and suffix.
November 19th 2009
UNICOS in depth
27
Naming convention

TAG_prefix



TAG_PREFIX = TAG_prefix in upper case
TAG_package





String, e.g.: DQGTW
Function: TAG_FrontEndType_getArchiveProxyDPE, e.g.:
DQGTW_getArchiveProxyDPE
TAG_FRONTENDTYPE = TAG_FrontEndType in upper case
TAG_DeviceType



String, e.g.: qps
TAG_PACKAGE = TAG_package in upper case
TAG_FrontEndType


String, e.g.: qps
String, e.g.: DQAMCMB
Function: TAG_DeviceType_getArchiveProxyDPE, e.g.:
DQAMCMB_getArchiveProxyDPE
TAG_DEVICETYPE = TAG_DeviceType in uppercase
November 19th 2009
UNICOS in depth
28
Rules for development




Panels
 Use prefix, group the panels by functionalities
 Widgets in objects/…
 Faceplate, device action in vision/TAG_package/TAG_DeviceType
 Panels re-used in many places in the package in
vision/TAG_package/common
Libs
 All constants in a lib  TAG_prefixConstant_declarations.ctl
 Function used many time during import 
TAG_prefixConfigGenericFunctions.ctl
 Functions used many times for widget, faceplate, device action,
etc. TAG_prefixGenericFunctions.ctl
Use the MessageText (log book) to keep history of action, inform
user, etc.
Use unGenericDpFunctions_debugN and
unGenericDpFunctions_debugTN functions whenever possible
 Allow DebugN and DebugTN with condition
November 19th 2009
UNICOS in depth
29
Front-end/Device function calls:
three cases

Check/Import



Export




Different behavior for front-end and device
Configurable
Different behavior for front-end and device
Not configurable, function name based on front-end type
and device type
Different of driver type by function based on driver type if
needed (depends on the developer)
Widget, faceplate, right click, device action,
treeDeviceOverview



Same behavior for front-end and device
Device functions: fully configurable
Front-end functions: partly configurable
November 19th 2009
UNICOS in depth
30
New Front-end
1.
2.
3.
Create the device type: DPType
Set the front-end device definition
Create the front-end check, delete and import functions
scripts/libs/TAG_prefixConfigTAG_FrontEndType.ctl
4.
Create the front-end export functions
scripts/libs/TAG_prefixExportDevice.ctl
5.
Create the front-end diagnostic panel
Panels/vision/graphicalFrame/TAG_FrontEndType_DiagnosticDetail.pnl
6.
Create the front-end device functions
scripts/libs/TAG_prefixFrontEndType.ctl
7.
8.
Create the front-end icons for the tree device overview if needed
Create the widget, catalog of widget, widget param
panels/objects/FRONT_END/Widget_TAG_FrontEndType.pnl
images/objects/FRONT_END/Widget_TAG_FrontEndType.pnl/Widget_TAG_FrontEndType.png
panels/objects_parampanels/FRONT_END/TAG_prefixTAG_FrontEndType_para.pnl
9.
Create the faceplate
panels/vision/graphicalFrame/FaceplateTAG_FrontEndType.pnl
10.
11.
Configure the trending
Create the front-end system integrity
panels/vision/systemIntegrity/systemIntegrity_TAG_FrontEndType_configurationl.pnl
panels/vision/systemIntegrity/systemIntegrity_TAG_FrontEndType_operationl.pnl
scripts/libs/ TAG_prefixSystemIntegrity_TAG_FrontEndType.ctl
msg/en_US.iso88591/TAG_FrontEndType_systemIntegrity.cat
Test import, export, widget, faceplate, right click, snapshot, etc. in local and
distributed environment
November 19th 2009
UNICOS in depth
12.
31
New device
1.
2.
3.
4.
Create the device type: DPType
Set the device definition
Set the JCOP device definition
Create the device check and import functions
scripts/libs/TAG_prefixConfigTAG_DeviceType.ctl
5.
Create the device export functions
scripts/libs/TAG_prefixExportDevice.ctl
6.
Create the device functions
scripts/libs/TAG_prefixDeviceType.ctl
7.
8.
Create the device icons for the tree device overview if needed
Create the widget, catalog of widget, widget param
panels/objects/TAG_PACKAGE/TAG_prefixWidget_TAG_DeviceType’TAG_WidgetType.pnl
images/objects/TAG_PACKAGE/TAG_prefixWidget_TAG_DeviceType’TAG_WidgetType.pnl/TAG_prefixWidget_TAG_DeviceType’TAG_Wid
getType.png
panels/objects_parampanels/TAG_PACKAGE/TAG_prefixTAG_DeviceType_para.pnl
9.
Create the faceplate
panels/vision/TAG_PACKAGE/TAG_prefixFaceplateTAG_DeviceType.pnl
panels/vision/TAG_PACKAGE/TAG_prefixFaceplateTAG_DeviceType_status.pnl
panels/vision/TAG_PACKAGE/TAG_prefixTAG_DeviceTypeTrendingFaceplate.pnl
10.
11.
Configure the trending
Create the device action interface, select, acknowledge
panels/vision/TAG_PACKAGE/TAG_DeviceType_ButtonPanel.pnl
12.
Test import, export, widget, faceplate, right click, snapshot, etc. in local and distributed
environment
November 19th 2009
UNICOS in depth
32
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
33
Front-end: DPType
Mandatory DPE

Front-end counter DPE: used in systemIntegrity
November 19th 2009
UNICOS in depth
34
Device: DPType
Mandatory DPE
Selected state
Device access right
Device link
Device log


ProcessInput: input DPE
ProcessOuput: output DPE
November 19th 2009
UNICOS in depth
35
Front-end device definition

Configuration of the front-end device type

Function, proxy device type, etc.
November 19th 2009
UNICOS in depth
36
Device definition

Configuration of the device type

Function, proxy device type, etc.
November 19th 2009
UNICOS in depth
37
Device: JCOP device definition
panels/fwDevice/fwDeviceRegisterType.pnl

Set the archive config: used to calculate the expected size for the archive during the import
phase
November 19th 2009
UNICOS in depth
38
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
39
Check, Delete, Import: file

File


One front-end, one application
List of devices



All configuration in the same line
3 archives can be in files  use instead of the default one
Front-end type, driver number
#
# Database PVSS generated at 2008.06.01 22:03:40
#
# Device type: S7_PLC
#
#Delete;PLC_Quique;Sector81;
PLCCONFIG;S7-300;PLC_Quique;Sector81;0A;0;3;10;0;0;AB;500;137.138.37.232;DB10.DBD0;DB10.DBW20;DB10.DBW30;DB10.DBW40;DB10.DBD4F;0.1;2;
# FESystemAlarm (SystemAlarm)
#For S7-300 1
SystemAlarm;1;TEST_PLC_Comm_Status_with_FES7;DB1.DBW0;TRUE;Communication state with other FE;
#For S7-300 2
SystemAlarm;2;pb1;DB11.DBW30;TRUE;this is a positive alarm;
#For S7-300 3
SystemAlarm;3;pb2;DB11.DBW20;FALSE;this is a negative alarm;
#For S7-300 4
SystemAlarm;4;positive_true;DB11.DBW10;TRUE;hola positive_true;
#
# Database PVSS generated at 2008.06.01 22:03:40
#
# Device type: Alarm
#
Alarm;1001;QXD4N_A_SEPH_P_FS1S7;Full Stop;diagnostic.pnl;info.html;;SEPH;alarm;Alarm;0;DB69.DBW0;DB69.DBD2;DB69.DBW6;;;ValueArchive_0000;1;
Alarm;1002;QXD4N_A_SEPH_P_FS2S7;Full Stop;diagnostic.pnl;info.html;;SEPH;alarm;Alarm;0;DB69.DBW0;DB69.DBD22;DB69.DBW26;;;;1;
Alarm;1001;QQXD4N_A_SEPH_P_FS1S7;Full Stop;diagnostic.pnl;info.html;;SEPH;alarm;Alarm;0;DB669.DBW0;DB669.DBD2;DB669.DBW66;ValueArchive_0000;;ValueArchive_0000;1;
Alarm;1002;QQXD4N_A_SEPH_P_FS2S7;Full Stop;diagnostic.pnl;info.html;;SEPH;alarm;Alarm;0;DB669.DBW0;DB669.DBD22;DB669.DBW266;ValueArchive_0000;;ValueArchive_0000;1;
#
# Database PVSS generated at 2008.06.01 22:03:40
#
# Device type: AnaDig
#
AnaDig;1001;Q_A_ADO1S7;Description Q_A_ADO1;diagnostic.pnl;info.html;NONE;SPARE;anadig;AnaDigValveVertical;%;EXP;100.0;0.0;90.0;10.0;0;0;N;0;0;DB168.DBW0;….38F;;;ValueArchive_0000;1;
AnaDig;1002;Q_A_ADO2S7;Description Q_A_ADO1;diagnostic.pnl;info.html;NONE;SPARE;anadig;AnaDigValveVertical;%;EXP;100.0;0.0;90.0;10.0;0;0;N;0;0;DB168.DBW0;..;
……
November 19th 2009
UNICOS in depth
40
Front-end/Device data flow: check


Front-end type
3 archives, valarch & RDB:


Boolean, Analog, Event: in device
config line from file or panel
Default behavior





- If TAG_DeviceType_getArchiveDPE
is defined: get the DPE per archive for
each TAG_DeviceType info from
TAG_DeviceType_getArchiveDPE
- if not get the TAG_DeviceType
archive DPE from the JCOP device
definition and use the default DPE rule
Delete
line
Boolean: bool, char DPE
Analog: float DPE
Event: int, uint, struct DPE
yes
Call TAG_prefixConfigTAG_FrontEndType_checkDeleteCommand
no
Check the available free space
sim driver and dist not running
PLCONFIG
line
no
yes
- Call TAG_prefixConfigTAG_FrontEndType_checkFrontEnd
- Call TAG_FrontEndType_getFrontEndArchiveDp
- Call TAG_FrontEndType_getArchiveProxyDPE
Error
Call TAG_prefixConfigTAG_FrontEndType_checkFrontEnd
yes
PLCONFIG
Communication
line
End file no
Device
yes
no
no
- Call TAG_prefixConfigTAG_FrontEndType_checkFrontEnd
for SystemAlarm devices
- Call TAG_FrontEndType_getFrontEndArchiveDp
- Call TAG_FrontEndType_getArchiveProxyDPE
- Call TAG_prefixConfigTAG_DeviceType_checkConfig
- Call TAG_DeviceType_getArchiveProxyDPE
yes
November 19th 2009
UNICOS in depth
41
Front-end: check

TAG_FrontEndType_getFrontEndArchiveDp: evalScript


TAG_FrontEndType_getArchiveProxyDPE: evalScript



Return the list of front-end, systemAlarm or FESystemAlarms DPEs to be
archived
Returns the list of proxy DPEs linked to the front-end
For boolean, analog and event archives
FrontEndType checkConfig: check the _UnSystemAlarm,
SystemAlarm, Front-end configuration, front-end DPE
configs, proxy configs, etc.


evalScript
PLCCONFIG keyword :


Mandatory field: PLCONFIG;front-end instance name;front-end application
Front-end configuration: as many as needed
PLCCONFIG;PREMIUM;vac_180;VAC;4;

_UnSystemAlarm keyword:
_UnSystemAlarm;nbr;Checked PLC;address;

SystemAlarm keyword:
SystemAlarm;1;vac_180;2;true;Communication state with PLC: vac_180;
November 19th 2009
UNICOS in depth
42
Device: check

TAG_DeviceType_getArchiveDPE: returns the list of device DPE for
boolean, analog and event archives


TAG_DeviceType_getArchiveProxyDPE




evalScript
evalScript
Returns the list of proxy DPEs linked to the device
For boolean, analog and event archives
DeviceType checkConfig: check the device configuration, device DPE
configs, proxy configs, etc.


evalScript
TAG_DeviceType keyword

Mandatory fields: “TAG_DeviceType;Device number (unique);Device name
(Device Identifier);description;Diagnostic panel;HTML page;Default
panel;subsystem1 (Domain);subsystem2
(Nature);TAG_DeviceTypeTAG_WidgetType;





Diagnostic panel: panel for the device diagnostic
HTLM page (link)
Default panel: panel that can be poped-up
TAG_DeviceTypeTAG_WidgetType: widget used in the treeDeviceOverview
Device configuration: as many as needed
November 19th 2009
UNICOS in depth
43
Front-end/Device data flow:
delete

Front-end type
Delete front-ends and devices

Application, device type, number
sim driver and dist not running


Delete
line
yes
Call TAG_prefixConfigTAG_FrontEndType_checkDeleteCommand
Call TAG_prefixConfigTAG_FrontEndType_deleteCommand
no
File switch of all the involved
valarch archives
November 19th 2009
UNICOS in depth
44
Front-end: delete

Delete keyword
 Mandatory field: Delete;Front-end instance name
Delete;Front-end device name[;Front-end application (or *);[Device type;[Device id;]]]
Optional: application name, device type, device number
Delete;vac_180
Delete;vac_180;Sector12;
Delete;vac_180;Sector*2*;AnalogInput*3*;


TAG_FrontEndType_check_deleteCommand: evalScript


Return the list of Device and proxy to be deleted
TAG_FrontEndType_deleteCommand: evalScript

Delete all the Device and proxy
November 19th 2009
UNICOS in depth
45
Front-end/Device data flow:
import
Delete
line



yes
no
Front-end type
With/without
check
sim driver and
dist not running
Call TAG_prefixConfigTAG_FrontEndType_checkDeleteCommand
yes
PLCONFIG
line
0 device
to delete
no
no
yes
Call TAG_prefixConfigTAG_FrontEndType_setFrontEnd
Error
PLCONFIG
Communication
line
no
End file
no
yes
Call TAG_prefixConfigTAG_FrontEndType_setFrontEnd
Call TAG_prefixConfigTAG_FrontEndType_setFrontEnd
for SystemAlarm devices
no
Device
yes
Call TAG_prefixConfigTAG_DeviceType_setConfig
yes
November 19th 2009
UNICOS in depth
46
Front-end/Device: import

Front-End:

TAG_FrontEndType_setConfig: evalScript


set the _UnSystemAlarm, SystemAlarm, Front-end configuration,
front-end DPE configs, proxy configs, etc.
PLCCONFIG keyword:


Mandatory field: PLCONFIG;front-end instance name;front-end application
Front-end configuration: as many as needed
PLCCONFIG;PREMIUM;vac_180;VAC;4
 _UnSystemAlarm keyword:
_UnSystemAlarm;nbr;Checked PLC;address;
 SystemAlarm keyword:
SystemAlarm;1;vac_180;2;true;Communication state with PLC: vac_180;

Device:

TAG_DeviceType_setConfig: evalScript

set the device configuration: DPE value, proxy configs, device
DPE configs (address, alarm, SMS, archive, etc.)
Alarm;1001;QXD4N_A_SEPH_P_FS1S7;Full
Stop;diagnostic.pnl;info.html;;SEPH;alarm;Alarm;0;DB69.DBW0;DB69.DBD2;DB69.DBW6
;;;ValueArchive_0000;1;
November 19th 2009
UNICOS in depth
47
Front-end/Device data flow:
export





Front-end type
Front-end
One/many application
One/many device type
To produce the same
file as the one used in
the import
yes
No more
application
no
Call TAG_FrontEndType_Com_ExportConfig
No more
Device
yes
no
Call TAG_FrontEndType_TAG_DeviceType_ExportConfig
November 19th 2009
UNICOS in depth
48
Front-end/Device: export

Front-end


TAG_FrontEndType_Com_ExportConfig: for each front-end
application
 evalScript
 Returns the front-end configuration: device value, configs,
proxy, etc.
 Returns the associated _UnSystemAlarm devices configuration
 Returns the associated SystemAlarm devices configuration
Device

TAG_FrontEndType_TAG_DeviceType_ExportConfig: for each
device
 evalScript
 Returns the device configuration: device value, configs, proxy,
etc.
November 19th 2009
UNICOS in depth
49
Test



All the possible errors during the check,
delete and import phase
The export
Final test:



export->import of export file->export
The two exported files must be identical except
the time of export.
Document describing the tests
November 19th 2009
UNICOS in depth
50
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
51
Front-end systemIntegrity data
flow



_UnSystemAlarm device
Check the communication link with
Front-end or any other relevant
data from front-end
Configuration, operation panel
dpSet(comma
nd, enable/dis
able)
Mask/unmask/ack
_unSystemAlarm_devicePattern_deviceName
At panel initialization get all _unSystemAlarm_devicePattern_deviceName
At panel intialiaze dpConnect(.., result, commandResult)
SystemIntegrity script
dpSe
t(com
Call
TAG_prefixSystemIntegrity_TAG_FrontEndType_Initialize
dpSet(
comma
dpSe
gnos
rs, lis
t of d
evice
and
m
Com
)
enable/disable
nd, add/delete/
dpSet(comma
devices)
of
list
s,
ter
dpSet(parame
)
,…)
dle
han
ice_
tic)
)
mete
dev
d, dia
nd, add
t(para
ct(
nne
man
o
Register
TAG_prefixSystemIntegrity_TAG_FrontEndType_HandleCommand
dpC
)
ack,…
Callb
data
ice_
t(dev
dpSet(data, …)
c
onne
Register
TAG_prefixSystemIntegrity_TAG_FrontEndType_DataCallback
November 19th 2009
dpC
UNICOS in depth
52
systemIntegrity: alarm screen
November 19th 2009
UNICOS in depth
53
Front-end: system integrity

Configuration panel
panels/vision/systemIntegrity/systemIntegrity_TAG_FrontEndType_configurationl.pnl


$-param $sComponent: the system integrity component
Operation panel
panels/vision/systemIntegrity/systemIntegrity_TAG_FrontEndType_operationl.pnl


$-param $sComponent: the system integrity component
Catalogue file containing the list of all the possible systemIntegrity alarm pattern and alarm value
msg/en_US.iso88591/TAG_FrontEndType_systemIntegrity.cat
e.g.:
DS_Comm_0,Comm Ok
DS_Comm_10,Communication problem with the TAG_FrontEndType front-end

systemIntegrity functions in lib:




TAG_FrontEndType_systemIntegrityInfo(): return the list of systemAlarm pattern, e.g.:
makeDynString(DS_pattern);
Initialize: evalScript, returns the list of devices with enabled system alarms
DataCallback: callback function on config data
HandleCommand: callback function on the interface DPE






Add: add front-end system integrity on the front-end
Delete: delete front-end system integrity on the front-end
Enable: enable the front-end system integrity of the front-end
Disable: disable the front-end system integrity of the front-end
Diagnostic: give back the list and state of the system integrity of the front-end
…
Do a periodic check on an alive counter and create system alarm,
dpConnect on front-end device data, etc.

Generate _UnSystemAlarm

November 19th 2009
UNICOS in depth
54
Front-end: diagnostic
panels/vision/graphicalFrame/TAG_FrontEndType_DiagnosticDetail.pnl

$-param $sFrontEnd the front-end DP name

Put all relevant and useful info from front-end or proxy for debugging
November 19th 2009
UNICOS in depth
55
Test

Panels


systemIntegrity lib


Local and remote system, WXP and Linux
All cases
Document describing the tests
November 19th 2009
UNICOS in depth
56
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click,
snapshot, trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
57
Front-end/Device : widget

Summarized view of the device data, proxy data, linked data

Data quality: quality of the front-end communication link
Device widget layout
Data quality
Data quality
Alarm
W
Body
Front-end widget layout
Alarm
A
M
W
Body
Mode
A
M
Mode
Lock state
WidgetArea
Selection
WidgetArea
Device selected
Device selected
By another UIM
No action possible
Mouse over
Device selected
mouse over
November 19th 2009
UNICOS in depth
58
Front-end/Device data flow:
widget
unGenericObject_WidgetInit
LockBmp
=””
yes
no
Set LockBmp invisible
$sIdentifier
=””
yes
no
Call
TAG_prefixTAG_DeviceType_WidgetRegisterCB
TAG_FrontEndType_WidgetRegisterCB
November 19th 2009
Call
TAG_prefixTAG_DeviceType_WidgetDisconnection
TAG_FrontEndType_WidgetDisconnection
UNICOS in depth
59
Front-end/Device: widget

Widget: as many as needed




$-param: $sIdentifier, device name
Mandatory variables: g_bCallbackConnected, g_sWidgetType, g_bUnSystemAlarm,
g_bSystemConnected
Function call: unGenericObject_WidgetInit
Widget register DistributedControl CB on device system name
Front-end: TAG_FrontEndType_WidgetRegisterCB
Device: TAG_DeviceType_WidgetRegisterCB

Panel global var (outside main) allowed

Check the state of the system:




DISCONNECT: call widget disconnection function
DPCONNECT: do dpConnect to the device data, proxy data, linked data and the front-end
system integrity state
DPDISCONNECT_DISCONNECT: do dpDisconnect to the device data, proxy data, linked
data and the front-end system integrity state
Widget disconnection: execScript
Front-end: TAG_FrontEndType_WidgetDisconnection
Device: TAG_DeviceType_WidgetDisconnection

Only one parameter given to the function: widget type

Animate the disconnection state of the widget

Everything in dark violet and disabled
November 19th 2009
UNICOS in depth
60
Front-end/Device: widget



Catalog of widget: png file
Param panel:
 Device name selector, local and remote system
Tips:
 DPE static information in widget: description, format, unit, etc.




Get it once in the functions TAG_FrontEndType_WidgetRegisterCB
and TAG_DeviceType_WidgetRegisterCB in case of DPCONNECT
Keep it in var in the widget panel
Conflict between widget register CB and widget disconnection
when the remote system is disconnected if animation CB too long
encapsulate all setMultiValue with g_bSystemConnected
 Declared as a global var like g_bCallbackConnected
 g_bSystemConnected represents the state of the remote system
 Set in widget status register
November 19th 2009
UNICOS in depth
61
Front-end/Device multi widget:
tips …

Same functionality: right click, etc.



Use evalScript/execScript based on the
g_sWidgetType in the device data widget
animation
E.g.: unGenericObject_WidgetHeaterAnimation,
unGenericObject_WidgetHeaterDisconnection
Different functionality

Use dummy device with device widget functions


E.g.: GenericDevice
Overwrite the functions

Take care: package installation!
November 19th 2009
UNICOS in depth
62
Front-end/Device data flow:
faceplate

Detailed view of the device data, proxy data, linked data

Show the quality of the front-end communication link
panels/objects/UN_INFOS/unWidgetArea.pnl
click/double click/right click
unGenericObject_OpenFaceplate
deviceName
exists
yes
unGenericObject_FaceplateStatusInit
no
Open
panels/vision/TAG_PACKAGE/TAG_DeviceType/TAG_prefixFaceplateTAG_DeviceType.pnl
Panels/vision/gtaphicalFrame/FaceplateTAG_FrontEndType.pnl
yes
Any
error
Call
TAG_prefixTAG_DeviceType_ FaceplateStatusDisconnection
TAG_FrontEndType_FaceplateDisconnection
November 19th 2009
UNICOS in depth
no
Call
TAG_prefixTAG_DeviceType_FaceplateStatusRegisterCB
TAG_FrontEndType_FaceplateRegisterCB
63
Front-end/Device: faceplate

One faceplate


$-param: $sDpName, device DP name
Front-end:


panels/vision/graphicalFrame/FaceplateTAG_FrontEndType.pnl
Function call: unGenericObject_FaceplateStatusInit



addSymbol/removeSymbol of panels/vision/graphicalFrame/TAG_FrontEndType_DiagnosticDetail.pnl
Mandatory variable: g_bCallbackConnected, g_bUnSystemAlarm, g_bSystemConnected
Device:


Status tab
Trending tab:
unGenericObject_FaceplateTrendInit or unGenericObject_TabFaceplateExtendedTrendInit

Trending panel


With fwTrending/fwTrendingTrendControl.pnl, fwTrending/fwTrendingTrend.pnl and
fwTrending/fwTrendingTrendFaceplateCaption.pnl or
fwTrending/fwTrendingTrendFaceplateCaptionLarge.pnl
Status tab for Device:
panels/vision/TAG_package/TAG_prefixFaceplateTAG_DeviceType_status.pnl

$-param: $sDpName device DP name

Function call unGenericObject_FaceplateStatusInit

Mandatory variable: g_bCallbackConnected, g_bUnSystemAlarm, g_bSystemConnected
November 19th 2009
UNICOS in depth
64
Front-end/Device: faceplate

Faceplate status register DistributedControl CB on device system name
Front-end: TAG_FrontEndType_FaceplateRegisterCB
Device: TAG_DeviceType_FaceplateStatusRegisterCB

Panel global var (outside main) allowed

Check the state of the system:

DISCONNECT: call faceplate disconnection function

DPCONNECT: do dpConnect to the device data, proxy data, linked data and the front-end system
integrity state

DPDISCONNECT_DISCONNECT: do dpDisconnect to the device data, poxy data, linked data and the
front-end system integrity state

Faceplate status disconnection: execScript
Front-end: TAG_FrontEndType_FaceplateDisconnection
Device: TAG_DeviceType_FaceplateStatusDisconnection

No parameter

Animate the disconnection state of the faceplate

Everything in dark violet and disabled

Tips:



Conflict between faceplate register CB and faceplate disconnection when the remote system
is disconnected if animation CB too long
encapsulate all setMultiValue with g_bSystemConnected

Declared as a global var like g_bCallbackConnected

g_bSystemConnected represents the state of the remote system

Set in Faceplate status register
DPE static information in widget: description, format, unit, etc.


Get it once in the functions TAG_FrontEndType_WidgetRegisterCB and
TAG_DeviceType_WidgetRegisterCB in case of DPCONNECT
Keep it in var in the widget panel
November 19th 2009
UNICOS in depth
65
Front-end/Device: widget &
faceplate with alert_hdl dpConnect

alert_hdl config modified


Automatic disconnect
Tips: TAG_DeviceType_WidgetRegisterCB,
TAG_DeviceType_FaceplateStatusRegisterCB
functions

DPCONNECT case


dpConnect DPE:_lock._alert_hdl._locked, in the callback do
dpConnect to device data, proxy data, linked data
DPDISCONNECT_DISCONNECT case

dpDisconnect DPE:_lock._alert_hdl._locked and dpDisconnect
to device data, proxy data, linked data
November 19th 2009
UNICOS in depth
66
Front-end/Device data flow: right
click

Configurable pop-up menu
panels/objects/UN_INFOS/unWidgetArea.pnl
right click
unGenericObject_WidgetRightClick
PVSS
system
connected
yes
Call
TAG_prefixTAG_DeviceType_MenuConfiguration
TAG_FrontEndType_MenuConfiguration
Call PVSS popupMenu function
no
Call
TAG_prefixTAG_DeviceType_HandleMenu
TAG_FrontEndType_HandleMenu
November 19th 2009
UNICOS in depth
67
Front-end/Device: right click

Create the pop-up menu: evalScript
Front-end: TAG_FrontEndType_MenuConfiguration
Device: TAG_DeviceType_MenuConfiguration

Generic functions:





unGenericObject_addSelectToMenu: add “Select” or “Deselect”
unGenericObject_UnicosActionToMenu: add “Ack alarm”, etc.
unGenericObject_addDefaultUnicosActionToMenu: add “Faceplate”,
“Diagnostic”, “Info”
unGenericObject_addTrendActionToMenu: add the dynamic trending and
device DPE trending
Handle the pop-up menu: evalScript
Front-end: TAG_FrontEndType_HandleMenu
Device: TAG_DeviceType_HandleMenu

Generic functions




unGenericObject_handleSelect: to handle “Select” or “Deselect”
unGenericObject_handleDefaultUnicos: handle “Faceplate”, “Diagnostic”,
“Info”
unGenericObject_handleTrendAction: handle the dynamic trending and device
DPE trending
unGenericObject_HandleUnicosMenu: call above functions
November 19th 2009
UNICOS in depth
68
Front-end/Device data flow:
treeDeviceOverview snapshot
Call
TAG_prefixTAG_DeviceType_ObjectListGetValueTime
TAG_FrontEndType_ObjectListGetValueTime
November 19th 2009
UNICOS in depth
69
Front-end/Device: treeDeviceOverview
snapshot



treeDeviceOverview mode snapshot
Filtering on state
Front-end: evalScript
‘FrontEndType’_ObjectListGetValueAndTime

Device: evalScript
DeviceType ObjectListGetValueAndTime

Return: dyn_string
[1]:
[2]:
[3]:
[4]:
[5]:
timestamp
value
invalid
state
color
November 19th 2009
UNICOS in depth
70
Front-end: treeDeviceOverview
./pictures/TAG_FrontEndType/iconWithChildrenClose.bmp
./pictures/TAG_FrontEndType/iconWithChildrenOpen.bmp
./pictures/TAG_FrontEndType/iconWithChildrenPath.bmp
./pictures/TAG_FrontEndType/iconWithChildrenSelected.bmp
./pictures/TAG_FrontEndType/iconWithoutChildrenNotSelected.bmp
./pictures/TAG_FrontEndType/iconWithoutChildrenSelected.bmp
November 19th 2009
UNICOS in depth
71
Front-end/Device: trend
configuration

Trend device data, proxy device data

Trending DPE: leaf DPE below ProcessInput and
ProcessOutput DPE
PVSSSystemName:PVSSAlias.leafProcessInput/OutputDPE


Two kind of trending DPE




E.g.: QRL81:CT_PT100.PosSt
Faceplate trending
fwTrendingPlot
Define the device DPE to be trended in faceplate
and in plot
Define the list of faceplate trend


tab
Trend button
November 19th 2009
UNICOS in depth
72
Front-end/Device: trend DPE
configuration
1
November 19th 2009
2
UNICOS in depth
73
Front-end/Device: faceplate trend
configuration
November 19th 2009
UNICOS in depth
74
Device function call:
device action
unGenericObject_ButtonInit
Setup Callback on unGenericObject_ButtonUserCB



Device action interface
User log in/log out
Device selected
Any
error
no
yes
Call
TAG_prefixTAG_DeviceType_ButtonRegisterCB
Call
TAG_prefixTAG_DeviceType_ButtonDisconnection
unGenericObject_ButtonSelectAction
panels/objects/UN_INFOS/unWidgetArea.pnl
click/double click
unGenericObject_ButtonUserCB
Call
TAG_prefixTAG_DeviceType_ButtonUserAccess
Call
TAG_prefixTAG_DeviceType_ButtonUserAccess
PVSS
system
connected
Device
not selected
and select
allowed
no
yes
yes
no
Select the device
Call
TAG_prefixTAG_DeviceType_ButtonDisconnection
Call
TAG_prefixTAG_DeviceType_UserLoginGetButtonState
Call
TAG_prefixTAG_DeviceType_ButtonSetState
November 19th 2009
UNICOS in depth
75
Device: access control







Only for device
Based JCOP access control
Multi domain, 4 privileges/domain
List of device action per privilege
for all domain
Device access rights: list of action
for a given level of privilege and
domain.
Can be set during the import
If not set: default behavior in
functions.
November 19th 2009
UNICOS in depth
76
Device type: action interface

Panel
panels/panels/vision/TAG_package/TAG_prefixTAG_DeviceType_ButtonPanel.pnl

Mandatory variables:






g_bCallbackConnected: the state of the PVSS system
g_dsUserAccess: to keep the device access rights
g_sFaceplateButtonType: device type
$-param: $sDpName device DP name
Functions
 TAG_DeviceType_ButtonUserAccess
 TAG_DeviceType_UserLoginGetButtonState
 TAG_DeviceType_ButtonSetState
 TAG_DeviceType_ButtonRegisterCB
 TAG_DeviceType_ButtonSetState
 TAG_DeviceType_ButtonDisconnection
Tips:
 Use as button name the device action name
 E.g.: SetValue, Select, Ack
November 19th 2009
UNICOS in depth
77
Device: action interface functions

TAG_DeviceType_ButtonUserAccess: evalScript



When user log in/out
no panel var, no $-param
Must return the device access rights: list of allowed device actions








When user log in/out
Device action is opened
no panel var, no $-param
Must return the device state, same format as the var given to DeviceType ButtonSetState
Kept in g_dsUserData
TAG_DeviceType_ButtonSetState: evalScript



Kept in g_dsUserAccess and given to DeviceType ButtonSetState
TAG_DeviceType_UserLoginGetButtonState: evalScript


Parameter: device state, device action access rights
Set the device action button according the access rights and the device state
TAG_DeviceType_ButtonRegisterCB: DistributedControl CB on device system name



From device action panel
Panel global var (outside main) allowed
Check the state of the system:




unGenericDpFunctions_getAccessControlPriviledgeRigth: returns the list of actions for the 4 privileges
If no device action defined, define the default behavior for the 4 privileges
DISCONNECT: call ButtonDisconnection function
DPCONNECT: Call DeviceType ButtonUserAccess, store the result in g_dsUserAccess, do dpConnect to the device data
DPDISCONNECT_DISCONNECT: do dpDisconnect to the device data
TAG_DeviceType_ButtonDisconnection: evalScript

Animate the disconnection state of the device action panel: all button disabled
November 19th 2009
UNICOS in depth
78
Front-end: access control


Set buttons in front-end diagnostic panel:
panels/vision/graphicalFrame/TAG_FrontEndType_DiagnosticDetail.pnl
Based on file access control


3 privileges, multi domain
Functions:
unGenericButtonFunctionsHMI_isAccessAllowed, unGenericButtonFunctionsHMI_getUnicosPriviledges
unGenericDpFunctions_getAccessControlPriviledgeRigth, …
November 19th 2009
UNICOS in depth
79
Test: widget, faceplate, device action,
access control, right click, snapshot
Everything must be tested with local and remote
PVSS system, WXP and Linux


With simulator:




Test with remote system: panels, utilities opened since
the beginning and before each step
 Remote system never connected
 Remote system connected the first time
 Remote system disconnected
 Remote system re-connected
PVSS scripts, PVSS panels, simulator, etc.
With “”, unknown device, local device, remote
devices, etc. as device identifier
Document describing the tests
November 19th 2009
UNICOS in depth
80
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
81
Device: alarm list

DeviceType Acknowledge alarm: evalScript


Returns the DPE to acknowledge and the action
Function to create and configure alarm: unConfigGenericFunctions_setAlarmDescription,
unConfigGenericFunctions_setDigitalAlert, unConfigGenericFunctions_setAnalogAlert
unGenericObject_Acknowledge
Call
TAG_prefixTAG_DeviceType_AcknowledgeAlarm
Acknowledge PVSS
alarm
Ack
PLC
yes
Acknowledge alarm in
PLC (CPC Front-end)
November 19th 2009
UNICOS in depth
no
82
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
83
Device: Event list
configuration
Event list
November 19th 2009
UNICOS in depth
84
1.
2.
3.
4.
Introduction
Concept of the core of UNICOS
What can be added/modified in package
New package: step by step description








Introduction, rules and procedure
Configuration
Check, delete, import, export
Front-end systemIntegrity
Widget, faceplate, device action, right click, snapshot,
trending
Alarm list
Event list
Packaging
November 19th 2009
UNICOS in depth
85
Package the development


Package to be installed via the fwInstallation tool
Package files:


xml: list of all files of the package
dpl: file to be ascii import





.config: list of libs to be added in the config file
Dependencies, date
.init: panel or script launched during the installation












Useful to ask a confirmation from the user for settings
Panel: cannot be executed in background
.postInstall: post install script


Front-end/Device configuration, settings, trending, etc.
Take care of setting, can be overwritten
Set configuration: take care, settings can be overwritten
Create the Windows and Linux OWS file
Widget: widget file, png, param panels
Faceplate, device action button, trend device panel
Front-end diganostic
Libs: device libs, front-end libs
colorDB file, catalog file
Test panel
Front-end type bmp files
Any utilities: scripts, panels, etc.
Test: test the package on a new project!
November 19th 2009
UNICOS in depth
86
Questions?

Web: http://wikis/display/EN/PVSS


Import/export:


\\cern.ch\dfs\Departments\AB\Groups\CO\sections\IS\projects\U
NICOS\PVSS\framework\documentation\UNICOS-2.0Internal\Schneider_SIEMENS_PVSS-UNICOS-export.doc
Proxy:


Packages, 3.6SP2 & 3.8SP1, Doc on Device, Front-end,
systemIntegrity
\\cern.ch\dfs\Departments\AB\Groups\CO\sections\IS\projects\U
NICOS\PVSS\framework\documentation\UNICOS-2.0Internal\device-with-UNICOS.pdf
UNICOS-HMI

\\cern.ch\dfs\Departments\AB\Groups\CO\sections\IS\projects\U
NICOS\PVSS\framework\documentation\UNICOS-HMI.pdf
November 19th 2009
UNICOS in depth
87