MADOCA II (Message and Database Oriented Control Architecture II) is next generation of MADOCA and was developed to fulfill current and future requirements in accelerator and beamline control at SPring-8. In this paper, we report on the recent evolution in MADOCA II for data collection, which was missing in the past reports at ICALEPCS *,**. In MADOCA, the biggest challenge in data collection was to manage signals into Parameter Database smoothly. Users request Signal Registration Table (SRT) for new data collection. However, this costed time and manpower due to typo in SRT and iteration in DB registration. In MADOCA II, we facilitated signal registration scheme with prior test of data collection and validity check in SRT with web-based user interface. Data collection framework itself was also extended to manage various data collection types in SPring-8 with a unified method. All of data collection methods (polling, event type), data format (such as point and waveform data) and platform (Unix, Embedded, Windows including LabVIEW) can be flexibly managed. We started to implement MADOCA II data collection into SPring-8 with 241 hosts and confirmed stable operation since April 2016.* T. Matsumoto et al., Proceedings of ICALEPCS 2013, p.944. ** A.Yamashita et al., Proceedings of of ICALEPCS 2015, p.648

In 2011, CERN's Controls Middleware (CMW) team started a new project aiming to design and implement a new generation equipment access framework using modern, open-source products. After reviewing several communication libraries [1], ZeroMQ [2] was chosen as the transport layer for the new communication framework. The main design principles were: scalability, flexibility, easy to use and maintain. Several core ZeroMQ patterns were employed in order to provide reliable, asynchronous communication and dispatching of messages. The new product was implemented in Java and C++ for client and server side. It is the core middleware framework to control all CERN accelerators and the future GSI FAIR [3] complex. This paper presents the overall framework architecture; choices and lessons learnt while designing a scalable solution; challenges faced when designing a common API for two languages (Java and C++) and operational experience from using the new solution at CERN for 3 years. The lessons learnt and observations made can be applied to any modern software library responsible for fast, reliable, scalable communication and processing of many concurrent requests.[1] A. Dworak et al., "Middleware trends and market leaders 2011", ICALEPCS 2011. [2] ZeroMQ, http://zeromq.org [3] V. Rapp et al., "Controls Middleware for FAIR", PCaPAC 2014.

Funding:[*] Argonne National Laboratory's work was supported by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences, under contract DE-AC02-06CH11357.The purpose of the Advanced Photon Source Upgrade (APS-U) project is to update the facility to take advantage of the multi-bend achromat (MBA) magnet lattices, which will result in narrowly focused x-ray beams of much higher brightness. The APS-U installation has a short schedule of one-year. In order to plan and execute a task of such complexity, a collaboration between many individuals of very diverse backgrounds must exist. The Component Database (CDB) has been created to aid in documenting and managing all the parts that will go into the upgraded facility. After initial deployment and use, it became clear that the system must become more flexible, as the engineers started requesting new features such as tracking inventory assemblies, supporting relationships between components, and several usability requests. Recently, a more generic database schema has been implemented. This allows for the addition of more functionality without needing to refactor the database. The topics discussed in this paper include advantages and challenges of a more generic schema, new functionality, and plans for future work.

Funding:Work supported by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy.The repository of data for the Relativistic Heavy Ion Collider and associated pre-injector accelerators consists of well over half a petabyte of uncompressed data. By todays standard, this is not a large amount of data. However, a large fraction of that data has never been analyzed and likely contains useful information. We will describe in this paper our efforts to use machine learning techniques to pull out new information from existing data. Our focus has been to look at simple problems, such as associating basic statistics on certain data sets and doing predictive analysis on single array data. The tools we have tested include unsupervised learning using Tensorflow, multimode neural networks, hierarchical temporal memory techniques using NuPic, as well as deep learning techniques using Theano and Keras.

The Daniel K. Inouye Solar Telescope (DKIST) is currently under construction in Hawaii. The telescope control system comprises a significant number of subsystems to coordinate the operation of the telescope and its instruments. Integrating delivered subsystems into the control framework and managing existing subsystem versions requires careful management, including processes that provide confidence in the current operational state of the whole control system. Continuous software Quality Assurance provides test metrics on these systems using a Testing Automation Framework (TAF), which provides system and assembly test capabilities to ensure that software and control requirements are met. This paper discusses the requirements for a Quality Assurance program and the implementation of the TAF to execute it.

This paper describes the version control of oracle databases across different environments. The basis of this paper is the collaboration between the GSI Helmholtz Centre for Heavy Ion Research (GSI) and the European Organization for Nuclear Research (CERN). The goal is to provide a sufficient and practical concept to improve database synchronization and version control for a specific database landscape for the two research facilities. First, the relevant requirements for both research facilities were identified and compared, leading to the creation of a shared catalog of requirements. In the process database tools, such as Liquibase and Flyway, were used and integrated as prototypes into the Oracle system landscape. During the implementation of prototypes several issues were identified, which arise out of the established situation of two collaborating departments of the research facilities. Requirements on the prototype were, to be flexible enough to adapt to the given conditions of the database landscape. The creation of a flexible and adjustable system enables the two research facilities to use, synchronize and update the shared database landscape.

This paper presents the Automatic RElease Service (ARES) developed by the Industrial Controls and Safety systems group at CERN. ARES provides tools and techniques to fully automate the software release procedure. The service replaces release mechanisms, which in some cases were cumbersome and error prone, by an automated procedure where the software release and publication is completed with a few mouse clicks. ARES allows optimizing the time and the work to be performed by developers in order to carry out a new release. Consequently, this enables more frequent releases and therefore a quicker reaction to user requests. The service uses standard technologies (Jenkins, Nexus, Maven, Drupal, MongoDB) to checkout, build, package and deploy software components to different repositories (Nexus, EDMS), as well as the final publication to Drupal web sites.

The new developments inside the CS-Studio community were made using the JavaFX platform to overcome the limitations and difficulties of using Eclipse SWT. This article will explain the benefits and disadvantages of using the JavaFX technology inside Eclipse RCP, and try to foresee the path of the new generations of CS-Studio application.

Funding:This work has been supported by the German Federal Ministry of Education and Research (BMBF).UNICOS (UNified Industrial Control System) is a CERN-made framework to develop industrial control applications. It follows a methodology based on ISA-88 and provides components in two layers of a control system: control and supervision. The control logic is running in the first layer, in a PLC (Programmable Logic Controller), and, in the second layer, a SCADA (Supervisory Control and Data Acquisition) system is used to interface with the operators and numerous other features (e.g. alarms, archiving, etc.). UNICOS supports SIEMENS WinCC OA as the SCADA system. In this paper, we propose to use EPICS (Experimental Physics and Industrial Control System) as the supervision component of the UNICOS framework. The use case is the control system of a CO2 cooling plant developed at CERN following the UNICOS methodology, which had to be integrated in a control system based on EPICS. The paper describes the methods and actions taken to make this integration feasible, including automatic EPICS database generation, PLC communications, visualization widgets, faceplates and synoptics and their integration into CSS and EPICS, as well as the integration with the BEAST alarm system.

JavaFX, the GUI toolkit included in the standard JDK, has reached a level of maturity enabling its usage for Control Systems applications. Property bindings, built-in separation between logic (Controller) and visual part (FXML) that can be designed with Scene Builder, combined with the leverage of Java 8 features such as λ expressions or method references, make this toolkit a very compelling choice for the creation of clean and testable GUI applications. This article describes best practices and tools that improve developer's efficiency even further. Structuring applications for productivity, simplified FXML loading, the application of Dependency Injection and Presentation Model patterns, testability are discussed among other topics, along with support of IDE tooling.

ESO is in the process of designing a new instrument control application framework for the ELT project. During this process, we have used the experience in HW control gained from the first and second generation of VLT instruments that have been in operation for almost 20 years. The preliminary outcome of this analysis is a library of Statecharts models illustrating the behaviour of some of the most commonly used devices in telescope and instrument control systems. This paper describes the architectural aspects taken into consideration when designing the models such as HW/SW state representation, common/specialized behaviour, and failure management. An extension to Harel's formalism to facilitate reusability by dynamic creation of orthogonal regions is also proposed. The paper details the behaviour of some devices like shutters, lamps and motors together with the rationale behind the modelling choices. A mapping of the models to a concrete implementation using real HW components is suggested. Although these models have been designed following the principles of our conceptual architecture, they are still generic and platform independent, so they can be easily reused in other projects.

The Extremely Large Telescope is a 39-metre ground-based telescope being built by ESO. It will be the largest optical/near-infrared telescope in the world and first light is foreseen for 2024. The overall ELT Linux development environment will be presented with an in-depth presentation of its core, the waf build system, and the customizations that ESO is currently developing. The ELT software development for telescopes and instruments poses many challenges to cover the different needs of such a complex system:a variety of technologies, Java, C/C++ and Python as programming languages, Qt5 as the GUI toolkit, communication frameworks such as OPCUA, DDS and ZeroMQ, the interaction with entities such as PLCs and real-time hardware, and users, in-house and not, looking at new usage patterns. All this optimized to be on time for the first light. To meet these requirements, a set of tools was selected. Its content ranges from an IDE, to compilers, interpreters, analysis and debugging tools for the various languages and operations. At the heart of the toolkit lies the modern build framework waf:a versatile tool written in Python selected due to its multiple language support and high performance.

A.F. Joubert, B. Merry
SKA South Africa, National Research Foundation of South Africa, Cape Town, South Africa

The 64-antenna MeerKAT radio telescope is a precursor to the Square Kilometre Array. The telescope's correlator beamformer streams data at 600 Gb/s to the science data processing pipeline that must consume it in real time. This requires significant compute resources, which are provided by a cluster of heterogeneous hardware nodes. Effective utilisation of the available resources is a critical design goal, made more challenging by requiring multiple, highly configurable pipelines. We initially used a static allocation of processes to hardware nodes, but this approach is insufficient as the project scales up. We describe recent improvements to our distributed container deployment, using Apache Mesos for orchestration. We also discuss how issues like non-uniform memory access (NUMA), network partitions, and fractional allocation of graphical processing units (GPUs) are addressed using a custom scheduler for Mesos.

Control systems of large experimental facilities need a great number of heterogeneous interconnected parameters to control software applications. As configuration information grows in volume, it becomes harder to be maintained manually and poses a potential threat to data integrity. To tackle this problem, we applied ontological approach to storing configuration data. Ontology is a formal representation of concepts and relations of the domain of discourse, enriched by rules for inferring assumed knowledge. We designed the ontology that describes the controlling electronics for the double-direction bipolar transfer line K-500, which transports beam from the Injection Complex to colliders VEPP-4 and VEPP-2000 at BINP, Novosibirsk, Russia. We populated the ontology by importing data from existing configuration files of the control system and developed the interface for querying configuration data. The designed storage has several benefits over the conventional approaches. It maintains heterogeneous objects with non-trivial dependencies in centralized form, performs data verification and can be expanded to the diverse ontology describing all information about the facility.

Industrial power supplies deliver high and low voltage to a wide range of CERN's detector and accelerator components. These power supplies, sourced from external companies, are integrated into control systems via industry standard OPC servers. The servers are now being modernized. A key lesson learnt from running the previous generation of OPC servers is that vendor specific, black-box implementations can be costly in terms of support effort, particularly in diagnosing problems in large production-site deployments. This paper presents the projects producing the next generation of OPC servers; following an open, collaborative approach and a high degree of homogenization across the independent partners. The goal is to streamline development and support costs via code re-use and a template architecture. The collaborations aim to optimally combine CERN's OPC and production operations knowledge with each company's experience in integrating their hardware. This paper describes the considerations and constraints taken into account, including legal aspects, product commercialization and technical requirements to define a common collaborative approach across three hardware manufacturers.

The vacuum control of the Large Hadron Collider and its injectors is based on PLC and SCADA off-the-shelf components. Since late '90s, CERN's vacuum group has developed a dedicated control framework to drive, monitor and log the more than 10 000 vacuum instruments. Also, in 1998, CERN's industrial controls group developed the UNICOS framework (UNified Industrial Control System), becoming a de facto standard of industrial control systems and gradually deployed in different domains at CERN (e.g. Cryogenics, HVAC…). After an initial prototype applying the UNICOS-CPC (Continuous Process Control) framework to the controls of some vacuum installations, both teams have been working on the development of vacuum-specific objects and their integration, together with new features, into the UNICOS framework. Such convergence will allow this generic framework to better fit the vacuum systems, while offering the advantages of using a widespread and well-supported framework. This paper reports on the experience acquired in the development and deployment of vacuum specific objects in running installations, as a prototype for the vacuum controls convergence with UNICOS.

Since the introduction of the map-reduce paradigm, relational databases are being increasingly replaced by more efficient and scalable architectures, in particular in environments where a query will process TBytes or even PBytes of data in a single execution. The same tendency is observed at CERN, where data archiving systems for operational accelerator data are already working well beyond their initially provisioned capacity. Most of the modern data analysis frameworks are not optimized for heterogeneous workloads such as they arise in the dynamic environment of one of the world's largest accelerator complex. This contribution presents a Mixed Partitioning Scheme Replication (MPSR) as a solution that will outperform conventional distributed processing environment configurations for almost the entire phase-space of data analysis use cases and performance optimization challenges as they arise during the commissioning and operational phases of an accelerator. We will present results of a statistical analysis as well as the benchmarking of the implemented prototype, which allow defining the characteristics of the proposed approach and to confirm the expected performance gains.

Funding:Centro Científico Tecnológico de Valparaíso (CONICYT FB-0821) Advanced Center for Electrical and Electronic Engineering (CONICYT FB-0008)The ALMA Common Software (ACS) is a distributed framework used for control of astronomical observatories, which is built and deployed using roughly the same tools available at its design stage. Due to a shallow and rigid dependency management, the strong modularity principle of the framework cannot be exploited for packaging, installation and deployment. Moreover, life-cycle control of its components does not comply with standardized system-based mechanisms. These problems are shared by other instrument-based distributed systems. The new high-availability requirements of modern projects, such as the Cherenkov Telescope Array, tend to be implemented as new software features due to these problems, rather than using off-the-shelf and well-tested platform-based technologies. We present a general solution for high availability strongly-based on system services and proper packaging. We use RPM Packaging, oVirt and Docker as the infrastructure managers, Pacemaker as the software resource orchestrator and life-cycle process control through Systemd. A prototype for ACS was developed to handle its services and containers.

With the successful commissioning of CRYRING, the first accelerator being operated using the new control system for FAIR (Facility for Antiproton and Ion Research), also the new settings management system is now used in a production environment for the first time. Development efforts are ongoing to realize requirements necessary to support accelerator operations at FAIR. At CRYRING, new concepts for scheduling parallel beams are being evaluated. After these successful tests and the first production use, the focus now is to include major parts of the existing facility (synchrotron SIS18, storage ring ESR and transfer lines) into the system in the context of the Controls Retrofit project. First dry runs are planned for Q4 this year. The settings management system is based on the LSA framework, that was introduced at CERN in 2001 and is being developed and enhanced together in a collaboration with GSI. Notwithstanding all successes of LSA at both institutes, a review study was set up with the goal to make the LSA framework fit for the future. Outcomes of this study and impacts on the settings management system for FAIR are being presented.

PandABlocks is the open source firmware and software stack that powers PandABox, a Zynq SoC based "Position and Acquisition" platform for delivering triggers during multi-technique scanning. PandABlocks consists of a number of FPGA functional blocks that can be wired together at run-time according to application specific requirements. Status reporting and high speed data acquisition is handled by the onboard ARM processor and exposed via a TCP server with a protocol suitable for integration into control systems like "EPICS" or "TANGO". Also included in the framework is a webserver and web GUI to visualize and change the wiring of the blocks. The whole system adapts to the functional blocks present in the current FPGA build, allowing different FPGA firmware be created to support new FMC cards without rebuilding the TCP server and webserver. This paper details how the different layers of PandABlocks work together and how the system can be used to implement novel triggering applications.

A large number of movable devices are present in the field of accelerators and must often be integrated in a control system. Typical examples of these systems are phase shifters and magnetic dipoles among others. The standard industrial control system UNICOS-CPC (UNified Industrial COntrol System for Continuous Process Control) provides a set of generic device types which matches the majority of the industrial equipment employed in process control. This new development extends it with additional device types for precise positioning equipment based on stepping motors. The paper focuses on how the integration on UNICOS was fulfilled, the potential use of the solution and the automatic integration with the CERN real-time FESA (FrontEnd Software Architecture) framework. Finally, it illustrates a couple of use cases that already incorporate the solution: the CTF3 facility, the two-beam acceleration scheme envisioned for CLIC (Compact Linear Collider) and the EuroCirCol project for the measurements of the beam screen prototype for the FCC-hh (Future Circular Collider proton-proton).

The large number of industrial control systems based on PLCs (Programmable Logic Controllers) available at CERN implies a huge number of programs and lines of code. The software quality assurance becomes a key point to ensure the reliability of the control systems. Static code analysis is a relatively easy-to-use, simple way to find potential faults or error-prone parts in the source code. While static code analysis is widely used for general purpose programming languages (e.g. Java, C), this is not the case for PLC programs. We have analyzed the possibilities and the gains to be expected from applying static analysis to the PLC code used at CERN, based on the UNICOS framework. This paper reports on our experience with the method and the available tools and sketches an outline for future work to make this analysis method practically applicable.

B. Xaia, T. Gatsi, O.J. Mokone
SKA South Africa, National Research Foundation of South Africa, Cape Town, South Africa

Funding:SKA (SA) - National Research Foundation (NRF)The 64-dish MeerKAT radio telescope, under construction in South Africa, will become the largest and most sensitive radio telescope in the Southern Hemisphere until integrated with the Square Kilometre Array (SKA). Software testing is an integral part of software development that is aimed at evaluating software quality; verifying and validating that the given requirements are met. This poster will present the approach, techniques and tools used to automate the testing of the software that controls and monitors the telescope. Jenkins continuous integration system is the server used to run the automated tests together with Git and Docker as the supporting tools to the process. In addition to the aforementioned tools we also use an Automated Qualification Framework (AQF) which is an in-house developed software that automates as much as possible of the functional testing of the Control and Monitoring (CAM) software. The AQF is invoked from Jenkins by launching a fully simulated CAM system and executing the Integrated CAM Tests against this simulated system as CAM Regression Testing. The advantages and limitations of the automated testing will be elaborated in the paper in detail.

Among other functionalities, the tensorics library provides a framework to declaratively describe expressions of arbitrary values and resolve these expressions in different contexts. The Streaming Pool framework provides a comfortable way to transform arbitrary signals from devices into long-living reactive streams. The combination of these two concepts provides a powerful tool to describe modules for online analysis. In this paper we describe this approach, elaborate on the general concepts and give an overview of actual and potential use cases as well as ideas and plans for future evolution.

The Front-End Software Architecture (FESA) framework is the basis for most real-time software development for accelerator control at CERN. FESA designs are defined in an XML document which is validated against a schema to enforce framework constraints, and are used to automatically generate C++ boilerplate code in which the developer can then implement specific code. Design files can rapidly grow in complexity making the overview of the resulting system almost impossible to understand. One way to overcome this is to benefit from a graph-based representation of the design, with XML fragments summarized into logical blocks and association between the blocks depicted by arrows. As the intricacy of the graph is analogous to a potential complex design, it is also essential to provide an interactive Graphical User Interface (GUI) for parameterising and editing the graph generation in order to fine-tune a simpler and cleaner illustration of a FESA design. This paper describes such a GUI (FESA Graph Editor) and outlines how it benefits the design and documentation process of the FESA-design-document.

A browser-based graphical user interface has been developed at Diamond. It is known as known as MalcolmJS as it communicates using Diamond's Malcolm Middleware protocol. The original goal was to communicate, via websockets with a PandABox in order to allow a user to examine and set attributes of numerous functional blocks within the instrument. With the continuing maturity of the JavaScript language, in particular the release of ES6, along with the availability of off-the-shelf reactive open-source JavaScript libraries, such as Facebook's React and Node.js, a rich set of tools and frameworks have entered the arena of user interface development suitable for control systems. This paper describes the design decisions based on these tools, experiences and lessons learned during and after the development process and the possibilities for future development as a generic, adaptable framework for instrument and control system user interfaces.