UNICOS Application Builder Overview Ivan Prieto Barreiro 22112018
UNICOS Application Builder Overview Ivan Prieto Barreiro 22/11/2018 BE-ICS 1
Summary UNICOS Application Builder Architecture Generation workflow Use case: New target platform Plug-ins Jython templates CPC Reverse Engineering Workflow 22/11/2018 BE-ICS 2
UNICOS Application Builder 22/11/2018 BE-ICS 3
UNICOS Application Builder • Software factory used to develop UNICOS applications. • Main features: • Provide a unified and highly customizable code generation environment for PLC, SCADA and other UNICOS target platforms. • Keep the internal UNICOS types and engineering/process knowledge separated from UAB to maximize reusability. • Enforce input consistency and validity through automatic checking of syntax and grammar. • Flexibility: Easy to adapt the framework for new UNICOS packages. • Scalability: Modular architecture based on plug-ins. 22/11/2018 BE-ICS 4
UAB Modular Architecture UAB Core • • Common utilities required by most of the plug-ins (user report, logging, …). Dynamically discovering the different plug-ins. Load the UNICOS project data. Connect plug-ins with external files (specs, device type definitions, …). UAB Plug-ins • Platform dependent (Siemens, Schneider, Win. CC O. A. , …). • The plug-ins define the structure and format of the generated files (XML, SCL, …). UAB Resources • Set of resources required by the plug-ins. (Device Type Definitions, Jython Templates…). UAB Components • Logical integration of UAB plug-ins. • Friendly user interface (Wizard). • Detected by installation and update tool (UAB Bootstrap). 22/11/2018 BE-ICS 5
Application Generation Workflow Control System Engineer Component PID Alarm Analog Device Instantiation Templates CPC Wizard Baselines Touch Panel Process Logic Templates PLC: S 7 Specifications SCADA: Win. CC OA Device Types Plug-ins Panel: Win. CC Flex Resources Control Application SCADA PLC UAB Core Inputs PLC S 7 Core 22/11/2018 BE-ICS Outputs 6
Use Case: New Target Platform New target platform: EPICS New plug-in: EPICS New Wizard panel for EPICS New Jython Templates for EPICS New Baseline for EPICS Resources Analog CPC Wizard Baselines Touch Panel Process Logic Templates PLC: S 7 Specifications Control Application SCADA: EPICS PID Alarm Device Instantiation Templates SCADA: Win. CC OA Device Types Plug-ins Component Panel: Win. CC Flex 1. 2. 3. 4. 5. SCADA PLC UAB Core Inputs PLC S 7 Core 22/11/2018 BE-ICS Outputs 7
UAB Plug-ins Features • Platform dependent (Siemens, Schneider, Win. CC O. A. , …). • The plug-ins define the structure and format of the generated files (XML, SCL, …). Generation Workflow 1. Get the required parameters and data sources (specs file, templates location, output folder and output file(s) location). 2. Process the selected templates (global templates, device type templates, postprocess templates). 3. Write the output files with the data provided by the templates. Reusability • In some cases it is possible to reuse the same plug-in for different target platforms (when the plug-in functionalities are equal or very similar). • Example: The CPC Touch Panel generator is used for several targets: Magelis, TIA Portal and Win. CCFlexible. 22/11/2018 BE-ICS 8
Plug-in & Templates Execution Flow Call plug-in Execute template Method call UAB Core Utilities Method call Method return Return Continue plug-in execution When the generate button is pressed, the wizard will call the plug-in associated with the panel to perform the generation. 22/11/2018 BE-ICS 9
UCPC Plug-ins The UNICOS CPC component includes the following plug-ins: • Siemens PLC • • • Schneider PLC • • • Co. De. Sys Instance Generator Co. De. Sys Logic Generator SCADA • • • Unity Instance Generator Unity Logic Generator Co. De. Sys (Twincat, So. Machine) • • • S 7 Instance Generator S 7 Logic Generator Win. CC OA Generator Touch Panel Generator (Magelis, TIA Portal, Win. CC Flexible) General Purpose • Expert User Generator: 22/11/2018 BE-ICS 10
CPC Wizard Screenshots 22/11/2018 BE-ICS 11
CPC Wizard Screenshots 22/11/2018 BE-ICS 12
Jython Templates Features • The templates are specialized scripts used to generate code for the target platform. • The templates are located in the Resources Package (separated from the plug-ins). Different Nature • Device Type Templates: Generate code related to an specific device type. One template for each existing device type. • Global Templates: Used to generate code not related to the device types (like front-end configuration). • Semantic Rules: Used to validate the user inputs. These templates are shared by all the plug-ins. 22/11/2018 BE-ICS 13
Device Type Templates 22/11/2018 BE-ICS 14
CPC Reverse Engineering 22/11/2018 BE-ICS 15
Workflow Rules & Options Rules export XEF Rules PLC Spec Build Spec Diff Merge Build Spec export SCADA Spec DB CSV Merged Spec Original Spec Diff Merge Original DB CSV Rules Build Spec New Spec SCADA Spec 22/11/2018 BE-ICS 16
22/11/2018 BE-ICS
- Slides: 17