fwspy and unicos-cpc benjamin bradu giulio morpurgo cern, en-ice may2015
TRANSCRIPT
3
Use cases Develop a generic component in WinCC OA to provide online statistics on some DPe
Be able to compute and archive online in WinCC OA The up/down time of a Boolean value
Ex: Working hours of a pump since the pump is installed
The number of rising/falling edges of Boolean Value Ex: number of opening/closing of an OnOff valve since the valve is installed
The integral of an analog value Ex: Amount of filling water during the last month from a volumetric flow sensor (leak detection)
The average of an analog value Ex: temperature average during a week.
All these calculations can be: Made forever or in a sliding time window Reset at anytime by users
5
Sliding window
end: archive resultsstart end: archive results
start
• Several sums carried on simultaneously• Handling of start and stop of each window• Archive every result
6
Forever
Manual trigger
• Only one sum at a time• Acquisition started manually by User, or by threshold crossing• New points archived at regular frequency, or on User’s request
7
fwSPY Component One additional requirement worth keeping in mind is
that the typical number of dpes to be monitored could be around 100 (i.e. “small”). This is important to mention because the approach I used for the implementation is probably not scalable to a much higher number of spying devices.
8
fwSPY component
Three datapoint types SPY_SlidingWindow (“spying device”) SPY_Forever (“spying device”) SPY_AUXIL (used to store parameters, etc. for the component)
One Ctrl Manager script (fwSPY.ctl) Two libraries (SPY_lib.ctl, UsefulTool.ctl) Some panels (to be integrated/replaced by the Unicos
ones)
9
The principle Every spying operation will have a “spying device”
datapoint (“sliding window” or “forever”) This datapoint will have elements storing
The parameters for the spying operation (dpe, duration, units,…) The partial results The values to be archived
The fwSPY Ctrl Manager will react to any new value for a dpe currently spied, to upgrade the partial results
fwSPY will also deal with activation/deactivation of the spying devices, starting/ending of the sliding window, periodic production of the values to be archived for a “forever”
10
Compulsory parameters for a spying device
Any spying device Dpe (datapoint element to be spied)
(for float Dpes) Time units (seconds, minutes, hours, days,…)
Sliding window Duration (how long is the window) Repetition rate (how often should a new window start)
Forever Archivage Frequency (how often accumulated results
must be archived)
11
Archiving the results
The spying devices have some dpes which will be given the values to be archived whenever this is needed (for instance, whenever a sliding window terminates).
fwSPY does not know where you want to archive the results (application dependent).
As a default, it can assign to those dpes the same archiving configs that you assigned to the dpe which has to be spied.
…but it is up to you to decide otherwise.
Just to test, I also have installed a parallel archiving mechanism based on text files (MyArchive) in Benjamin’s app.
12
Creating a spying device: two ways
Configuration script, processed by dedicated panel SPY_ReadConfig.pnl
#SLIDING un-CFP_ATLAS_TS-ATLAS_TS-CPC_AnalogInput-50001.ProcessInput.PosSt 604800 86400#SLIDING un-CFP_ATLAS_TS-ATLAS_TS-CPC_AnalogInput-00008.ProcessInput.PosSt 3600 600#FOREVER un-CFP_ATLAS_TS-ATLAS_TS-CPC_OnOff-00014.ProcessInput.OnSt 60
Functions in the SPY_lib library
int SPY_SLW_create(string slw, mapping params, bool can_exist = FALSE)
int SPY_FOREVER_create(string frv, mapping params, bool can_exist = FALSE)
13
Other panels (prototype)
Prototype_ShowAllSliding, (Prototype_ShowAllForever)
Shows in a table all the existing Sliding Window (or Forever) datapoints, with some features. When clicking on a line, one of the following panels is launched, to show more details and provide control: Prototype_SLW_Float Prototype_SLW_Boolean Prototype_FOREVER_Float Prototype_FOREVER_Boolean
14
Just to give you a flavour, here are some views of the prototype panels. They are not intended for operation
This panel lists all the defined sliding window devices.Clicking on a device name opens a dedicated panel
17
Miscellaneous
It is possible to have more than one spying device connected to the same dpe. For instance, you might want to have a long term sliding window and a shorter term one; or a sliding window and a forever going on at the same time
18
Unicos integration All the panels are for demonstration only.
They are not supposed to be the final ones. The final format should be discussed and agreed with the Unicos people
…back to Benjamin
19
Current results Test done in a UNICOS-CPC testing project (ATLAS
thermosiphon)
Pump statistics (Boolean) Uptime: 20 000 hours since beginning % uptime: 20% Rising edge per hour: 60 Falling edge per hour: 60
Temperature statistics (analog): Average value: -70 C during the last week
Flow statistics: Average value: 6.5 m3/s Integral value in last hour: 20 250 m3/hour
20
Implementation in UNICOS-CPC
Setup of statistics: Imported via a text file Directly from the device (new tab in faceplate?)
Reading of statistics: In a summary panel containing all statistics registered in the projects Directly from the device (new tab in faceplate?)
Note that this fwSpy component performs statistics only on registered devices and it works in real-time only (we don’t look in archives)