Presentation is loading. Please wait.

Presentation is loading. Please wait.

Novel techniques while developing on the WinCC OA Experience with the UCPC library.

Similar presentations


Presentation on theme: "Novel techniques while developing on the WinCC OA Experience with the UCPC library."— Presentation transcript:

1 Novel techniques while developing on the WinCC OA Experience with the UCPC library.

2 Outline What is UCPC CPC6 ideas CPC6 technics

3 UNICOS and UCPC UNICOS is a framework to create control applications UCPC: A basic package (Continuous Process Control) to develop integrated process control applications. UNICORE UCPC package PLCs CPC PLCs (non CPC) Application packages (PIC, WIC, CIS,…) Application packages (CIET, SURVEY, QPS,..) Control layer UNICOSUNICOS Supervision layer Industrial PC HVAC Process Control applications LHC Collimators Interlocks LHC Gas Control LHC cryogenics 3CERN, Sept/2012 UCPC Advanced Course: General Introduction

4 What is CPC Continuous Process Control is the set of devices implemented in the SCADA (WinCC OA, WinCC Flexible) and PLC (Siemens, Schneider, CoDeSyS) – IO objects (AnalogInput, DigitalOutput, …) – Interface objects (AnalogParameter, WordStatus, …) – Field objects (Analog, OnOff, MassFlowController, …) – Control Objects (PCO, PID, AnalogAlarm, …)

5 What is UCPC WinCC OA It is a CPC device’s implementation in WinCC OA: – Reuse UNICOS/FW components – Follow UNICOS/FW convention

6 Axioms/aims Keep all scripts in the.ctl, not.pnl Minimize device implementation code Use spaces not tabs

7 Aims Keep all scripts in the.ctl, not.pnl – Minimize changeable code in panels – Using g_params mapping instead dedicated variables: Old: g_sPosStUnit, g_sPosStFormat, … New: g_params mapping Minimize device implementation code Use spaces not tabs

8 Aims Keep all scripts in the.ctl, not.pnl Minimize device implementation code – Use generic UCPC functions in device implementations, e.g. powerful UCPC core Use spaces not tabs

9 Device ctrl scripts

10 Development workflow Package PVSSBootstrapper flex extractor unPackageCreation PVSS Project Template DTI

11 Target: control script UCPC is the set of device implementations. The device implementation: Importation and exportation Animation – Widget – Faceplate – Right click menu Access rights Configuration, …

12 PRACTICAL PART Let’s talk about control code: Outline: – Importation – Animation

13 Importation: CPC5 Constants that describe importation line Generic check function Front-End specific check functions Generic set function Front-End specific set functions

14 Importation: CPC6 Constants that describe importation line – Few additional constants for shared fields Configuration function – For each DPE specify it properties Core does all the work – Based on simple atomic functions – Proxy to the UNICOS core when possible

15 Importation: CPC5 - set DPE unConfigGenericFunctions_setFloatIntBlock(dsConfigs, PVSS_MODBUS_FLOAT, makeDynString("PosSt", "OutOVSt", "AuPosRSt", "MPosRSt"), makeDynInt(UN_CONFIG_ANALOG_ADDRESS_POSST, UN_CONFIG_ANALOG_ADDRESS_OUTOVST, UN_CONFIG_ANALOG_ADDRESS_AUPOSRST, UN_CONFIG_ANALOG_ADDRESS_MPOSRST), makeDynString("MPosR", "PLiOn", "PLiOff"), makeDynInt(UN_CONFIG_ANALOG_ADDRESS_MPOSR, UN_CONFIG_ANALOG_ADDRESS_PLION, UN_CONFIG_ANALOG_ADDRESS_PLIOFF), makeDynInt(UN_CONFIG_ANALOG_UNIT, UN_CONFIG_ANALOG_FORMAT, UN_CONFIG_ANALOG_DEADBANDE, UN_CONFIG_ANALOG_DEADBANDE_TYPE), makeDynInt(UN_CONFIG_ANALOG_RANGEMIN, UN_CONFIG_ANALOG_RANGEMAX), makeDynString("PosSt", "OutOVSt"), makeDynInt(UN_CONFIG_ANALOG_ARCHIVE_ACTIVE, UN_CONFIG_ANALOG_ARCHIVE_TIME_FILTER), exceptionInfo);

16 Importation: CPC6 – set DPE mappingClear(props); props["hasUnit"] = true; props["hasFormat"]= true; props["hasSmooth"] = true; props["hasArchive"] = true; props["hasPvRange"] = true; props["address"] = ".ProcessInput.PosSt"; props["dataType"] = CPC_FLOAT; config["PosSt"] = props;

17 Device check/set algorithm Setup DPE Foreach DPE setDeviceConfig(aDevice) address unit format smooth range description archive alert 5 range alert Setup device parameters meta info sms categories sms message mask event Device specific setup (if define)

18 PRACTICAL PART II Outline: – Importation – Animation

19 Animation: PVSS level dpConnect(function, dpe1, dpe2, …) function(string dpe1_name, int dpe1_value, string dpe2_name, bool dpe2_value, …) dpDisconnect(function, dpe1, dpe2, …) Problems: DPE list should be consistent Proxy function in case of floating amount of dpes

20 Animation: UNICOS level Unicos requires a callback for system integrity. Device needs to implement: – RegisterCB(string sDp, bool bSystemConnected) – Disconnection animation

21 Animation: alert handler In case when device contains alert handler that could be modified by user Device needs to implement: – PVSS animation routine on alert handler lock state

22 Animation: customizable device In case when device could not have some dpe configured (for example, interlocks could be disabled) Device needs to implement: – Set of connect/disconnect functions for each possible combination of configured dpes – Set of animation functions (normally these functions proxy to the generic one)

23 Animation: worst case Register callback – Connect alert_hdl – Disconnect alert_hdl Animate alert_hdl – Connect set1 – Disconnect set1 – Connect set2 – Disconnect set2 Animate set1 (proxy) Animate set2 Animate disconnection

24 Refactored animation What I care about in device implementation: List of DPEs that needs for animation Animation itself

25 Animation: CPC6 Function to define DPE list for animation – Insure connect/disconnect operates with the same dpes Animation function – Does disconnection animation for free – Clear API for animation Static init function – Use one mapping variable (key-value) – Insure that no wrong access in the implementation

26 Animation: CPC5 – faceplate/PosSt if(g_bSystemConnected) unGenericObject_DisplayValue(g_sPosStFormat, g_sPosStUnit, fPosSt, "StatusPosition", "unDisplayValue_Status", bPosStInvalid || (!bSystemIntegrityAlarmEnabled) || (iValAlarm > c_unSystemIntegrity_no_alarm_value));

27 Animation: CPC6 – faceplate/PosSt cpcFaceplate_animateOnlineValue(dpes, values, "PosSt", g_params["PosStUnit"], g_params["PosStFormat"], "cpcColor_Faceplate_Status"); cpcFaceplate_animateAnalogValue(dpes, values, "PosSt", "PosSt", "cpcColor_Faceplate_Status");


Download ppt "Novel techniques while developing on the WinCC OA Experience with the UCPC library."

Similar presentations


Ads by Google