Stage report

5 months working at
CERN (TE-CRG-CE section)

Francesco Frassinelli



Section leader: Marco Pezzetti

Tutor: Sara Comai

CERN

European Organization for Nuclear Research

  • Word's largest particle physics laboratory
  • Estabilished in 1954
  • 20 Member states
  • 2400 Full-time employees
  • 10 Departements
  • Located in Geneva (Switzerland)

TE-CRG-CE

  • Technology departement covers magnets, machine protection, power converters, vacuum systems, and cryogenics
  • Cryogenics group is responsible of the design, construction, operation and maintenance of cryogenics systems for accelerators and detectors
  • Controls and Electrical Support section provides support, maintenance and upgrades for controls for cryogenic system and test areas, cryogenic electrical equipment and infrastructure, interface and database management

My task

Collaborate with the control team for upgrading the CERN cryogenic control system (based on CERN/UNICOS framework) during the first LHC Long term Shutdown (LS1)

Areas of work

  1. Porting old code templates for SIMATIC 7 (Siemens)
  2. Creation of UAB specification checks
  3. Creation of cross validation tools and libraries
  4. Tools for supporting Unity (Schneider Electric) developers
  5. Jenkins cluster setup and configuration
  6. Collaboration with BE-CO-IN section
  7. Framework for testing PLC code

1. Template porting

Goal

Rewriting old PLC templates in order to work with the new CPC 6 template system based on Jython (Python for Java)

1.1 Template porting

Comparison between old and new template (PV930)

2. UAB checks

Goal

Implementing new checks for specification validation using UAB and Jython (Python for Java)

2.1 UAB checks

"Remarks" column must have valid caculated values for AnalogInputReal objects

2.2 UAB checks

Default values must fall within the valid range for WordParamenter and AnalogParamenter objects

2.3 UAB checks

Reporting inconsistency between WordParameter objects and "Device Links" column for Analog objects

3. Cross validation

Goal

Creation of a new application for checking multiple specifications in order to avoid UAB limitations


For accomplish this task, I have made new Python libraries for reading specifications

3.1 Cross validation

Communication check between ARC/LSS/RF

3.2 Cross validation

Consistency check between old and new specifications

3.3 Cross validation

Wrapper for executing UAB-compatible checks

3.4 Cross validation

Architecture

3.5 Cross validation

Command line interface

4. Unity tools

Goal

Automating time consuming tasks for people who works with Unity creating a tools suite

4.1 Unity tools

Automatically grouping and sorting source code fragments

More than 500 fragments for a single ATLAS project (!)
reordered in just a second

4.2 Unity tools

Automatically grouping, sorting and postprocessing drops informations for filling specifications

5. Jenkins

Goal

Automating time consuming tasks in order to check and rebuild automatically every LHC sector project if something changes (code template, checking rules, specifications, etc.) using a Linux/Windows server cluster

5.1 Jenkins

Features

  1. Web interface with reports
  2. Integration with CERN accounts (using LDAP)
  3. Keeping results of the latest working version
  4. You can know who has broken what
    (integration with Subversion/GIT repositories)

5.2 Jenkins

Generation process

5.3 Jenkins

Web interface

Sector 56 selected
Red status
job failed
Yellow status
job has been successful, but there are some warnings
Green status
job has been successful
Weather refers to last 5 tries
Layout2Specs generates specifications from layout database
Spec check uses UAB to validate the specifications
ARC LSS spec check uses cross validation tool to check communications consistency
Generation uses UAB to generate code
(with default templates)
Generation CRG Logic uses UAB to generate code
(with custom templates)
Compilation uses SIMATIC to compile the PLC code
(with default templates)
Logic compilation uses SIMATIC to compile the PLC code
(with custom templates)

Additional work

6. Collaboration with BE-CO-IN section

Goal

Make progresses regarding Windows to Linux server migration

6.1 Collaboration with BE-CO-IN section

Work done

  1. Accessing file from Linux servers with Windows client
    (implemented with Network File System client for Windows)
  2. Accessing to Linux servers graphically with NX protocol

7. Framework for PLC code testing

Goal

Python framework development for code testing over PLC and SIMBAPro (Siemens) simulation box

7.1 Framework for PLC code testing

Work done

  1. Code refactoring
  2. Migration from ctypes to cffi
  3. Bug fixing

Thanks

Thanks to Marco Pezzetti that gaved me this opportunity, for his humaneness and for what he taught me,
to my tutor Professor Sara Comai,
and to the whole fantastic group of cryogenics