European Southern Observatory

Instrument Control Software
Laboratory Exercise / Doc:
Issue
Date
Page / VLT-MAN-ESO-17240-4618
0.23
04.10.2008
2 of 79

VERY LARGE TELESCOPE

Instrument Control Software

Laboratory Exercise

Doc. No.: VLT-MAN-ESO-17240-4618

Issue: 0.23

Date: 04.10.2008

Prepared: M.Kiekebusch

J.Knudstrup

D.Popovic

Name Date Signature

Approved: G.Chiozzi

Name Date Signature

Released: M. Peron

Name Date Signature

Instrument Control Software
Laboratory Exercise / Doc:
Issue
Date
Page / VLT-MAN-ESO-17240-4618
0.23
04.10.2008
7 of 79

CHANGE RECORD

ISSUE / DATE / SECTION/PARA.
AFFECTED / REASON/INITIATION
DOCUMENTS/REMARKS
0.23 / 2008-10-04 / All / First issue.


TABLE OF CONTENTS

1 Introduction 7

1.1 Purpose 7

1.2 Acknowledgments 7

1.3 Scope 7

1.4 List of Abbreviations & Acronyms 7

1.5 List of Applicable and Referenced Documents 8

1.6 Reference Documents 8

1.7 Guidelines for Reading this Document 9

2 Overview 10

2.1 The Instrument 10

2.2 Hardware Architecture 10

2.2.1 Devices 10

2.2.2 Computers and Hardware 10

2.3 Software Architecture 12

2.4 Environment Configuration 13

2.4.1 User Accounts/Environments 13

2.4.2 CCS/LCC Environments 14

3 Exercise #1: Getting Started 15

3.1 Purpose 15

3.2 Implementation Details 15

3.3 Exercise Steps 15

3.3.1 Preparing the XXXX Modules for the Basic Adaptation 15

3.3.1.1 Checking and Adapting the Environment 15

3.3.1.2 Retrieve the XXXX Base Module 15

3.3.1.3 Initial Adaptation of the Integration Module 16

3.3.1.4 Retrieving the XXXX Modules 16

3.3.2 Adapting the Template Instrument to the Exercise Instrument 16

3.3.2.1 Create the Exercise Instrument Software 16

3.3.2.2 Adapt the Installation Configuration File 17

3.3.2.3 Adapting the TCS Simulator Configuration 17

3.3.2.4 Adapt the Instrument Configuration 18

3.3.2.5 Adapt the Start-up Configuration 18

3.3.2.6 Build the SW for the Exercise Instrument 18

3.3.2.7 Start the Instrument 18

3.4 Session Summary 19

4 Exercise #2: Instrument Control Software - ICS 20

4.1 Purpose 20

4.2 Implementation Details 20

4.2.1 Devices 20

4.2.2 Location of Relevant Configuration Files 20

4.3 Exercise Steps 21

4.3.1 Adapting the Instrument Configuration 21

4.3.2 Adjusting Instrument DB 23

4.3.2.1 Adjusting the DB Definition “iniEnv.db” 23

4.3.3 Configuring Scan Links 24

4.3.4 Setting Default LCU DB Configuration 25

4.3.5 Adjusting Instrument WS Simulation DB 25

4.3.6 Adjusting Instrument Dictionary 25

4.3.7 Setting Simulation Level 25

4.3.8 Adapt the “pkgin” configuration file 26

4.3.9 Build and Install Updated Modules 26

4.3.10 Re-building the SW 26

4.3.11 Starting ICS 26

4.4 Session Summary 27

5 Exercise #3: Implementing a Special Device 28

5.1 Purpose 28

5.2 Implementation Details 28

5.2.1 Device Description 28

5.2.2 Integration of the special device with the existing instrument 29

5.3 Exercise Steps 29

5.3.1 Retrieving the inilamp module: 29

5.3.2 Inclusion of the inilamp module in the integration module inins 29

5.3.3 Update of the “bootScript” for the environment “linics1” 29

5.3.4 Update of the instrument dictionary 30

5.3.5 Device configuration: 30

5.3.6 Update of the instrument DB 31

5.3.7 Update of scan links: 31

5.3.8 Update of the simulation DB: 31

5.3.9 Automatic creation of default LCU DB configuration 32

5.3.10 Build and Install Updated Modules 32

5.3.11 Verification - Rebuilding and restarting the instrument software 33

5.4 Code walkthrough - Optional 33

5.4.1 Device DB, file inilamp/dbl/inilampLAMP2.db: 33

5.4.2 Definition of DB attributes literals and DB access macros 35

5.4.3 Device Initialization 36

5.4.4 State change to STANDBY 36

5.4.5 State change to ONLINE 36

5.4.6 State change to OFF 37

5.4.7 Simulation ON 37

5.4.8 Simulation OFF 38

5.4.9 Device STATUS 38

5.4.10 Device SETUP 38

5.4.11 Important files: 38

5.5 Creating WS Lamp Special Device 39

5.6 Session Summary 42

6 Exercise #4: Interfacing with Detector Control Systems 43

6.1 Purpose 43

6.2 Exercise Steps 43

6.2.1 Adapt the Instrument Configuration for RTD Start-Up 43

6.2.2 Adapting the NGC IR Detector Configuration 43

6.2.2.1 Updating the High Level NGC IR Configuration 43

6.2.2.2 Update the NGC System and Detector Configuration 44

6.2.2.3 NGC IR Verification 45

6.2.3 Update the TCCD Configuration 48

6.2.4 Update “pkgin” TCCD Configuration 48

6.2.5 TCCD Verification 49

6.3 Session Summary 51

7 Exercise #5: Observation Software – OS 52

7.1 Purpose 52

7.2 Implementation Details 52

7.3 Exercise Steps 52

7.3.1 Configure OS Subsystems 52

7.3.2 OS Database Configuration 53

7.3.3 OS Verification 54

8 Exercise #6: Templates 57

8.1 Purpose 57

8.2 Additional Information 57

8.3 Implementation Details 57

8.4 Exercise Steps 58

8.4.1 Prepare science TSF Files (module “inotsf”) 58

8.4.2 Prepare the Sequencer Files (Module: “inoseq”) 61

8.4.3 Prepare Technical TSF Files (module: “inmtsf”) 66

8.4.4 Prepare Technical Sequence Files (module “inmseq”) 66

8.5 Session Summary 67

9 Exercise #7: Online Image Processing with CLIP 68

9.1 Exercise Steps 68

9.1.1 Customize NGC IR Server 68

9.1.2 Create an RTD acquisition panel 74

9.1.3 Modify the Acquisition Template (MoveToSlit) 76

9.2 Session Summary 77

10 Appendix A 78

1  Introduction

This document contains the course material for a laboratory exercise carried out in connection with the Instrument Control Software Workshop, held at the ESO premises in October 2008. The complete exercise is composed of 7 sessions that cover different parts of the instrumentation SW. Each session has a specific purpose and a number of steps that the participant should follow before continuing with the next session. After following all the instructions for each session, the final result of the lab exercise should be a fully working instrumentation SW.

Although the exercise has been developed for the workshop, it is intended to be used also for training in other contexts, e.g. for training new personnel (in this case, executed then as a self-study session).

1.1  Purpose

The purpose of the document is to provide a step by step set of instructions to implement the control SW for a fictitious instrument that should be built in the course of the laboratory exercise.

The document is aimed to become a guideline for how to approach the development of the control SW for a particular instrument complementing the INS SW documentation set and providing a practical example that can be used by developers to understand better the process of customizing the INS Template Instrument.

Note however, that it is not the intention of the exercise to show the way for implementing the control SW for an instrument, but rather to show one way with the purpose of giving the course participant a fairly thorough walk-through of many of the aspects of the development process.

1.2  Acknowledgments

The authors would like to thank M.Comin, M.Pruemm and G.Chiozzi(all three SDD/CIS) for their help and useful feedback in connection with the preparation of this document.

1.3  Scope

The intended audience are developers of instrument control SW from the consortia working in collaboration with ESO. In addition people coding and maintaining instrument SW at the observatory sites and whoever is using the INS SW framework of the VLT SW Package.

This document covers only the control part of the fictitious instrument SW. Pipelines development and other dataflow related aspects are out of the scope of this exercise.

1.4  List of Abbreviations & Acronyms

This document employs several abbreviations and acronyms to refer concisely to an item, after it has been introduced. The following list is aimed to help the reader in recalling the extended meaning of each short expression:

CCS / Central Control Software
DCS / Detector Control Software
DFS / Data Flow System
GUI / Graphical User Interface
HW / Hardware
HDU / Header/Data Unit (FITS)
ICS / Instrument Control Software
INS / Instrumentation Software Package
I/O / input/output
ISF / Instrument Summary File
IWS / Instrument Workstation
LCC / LCU Common Software
LCU / Local Control Unit
MS / Maintenance Software
N/A / Not Applicable
PAE / Preliminary Acceptance Europe
P2PP / Phase 2 Proposal Preparation
RTAP / Real-Time Application Platform
SW / Software
TBC / To Be Clarified
TBD / To Be Defined
TCS / Telescope Control Software
TIM / Time Interface Module
TRS / Time Reference System
TSF / Template Signature File
VLT / Very Large Telescope
WS / Workstation

1.5  List of Applicable and Referenced Documents

This document is based on the following documents:

Ref / Title / Document Number
[AD1]  / Data Interface Control Document / GEN-SPE-ESO-19400-0794
[AD2]  / VLT Software Programming Standards / VLT-PRO-ESO-10000-0228
[AD3]  / VLT Instrument Software Specification / VLT-SPE-ESO-17212-0001
[AD4]  / INS Common Software Specification / VLT-SPE-ESO-17240-0385
[AD5]  / Template Instrument Software – User and Maintenance Manual / VLT-MAN-ESO-17240-1973

1.6  Reference Documents

The following documents are referenced in this document:

Ref / Title / Document Number
[RD1]  / CCS User Manual / VLT-MAN-ESO-17210-0619
[RD2]  / HOS/Sequencer - User Manual / VLT-MAN-ESO-17220-0737
[RD3]  / VLT Software Real Time Display, User Manual / VLT-MAN-ESO-17240-0866
[RD4]  / IRACE-DCS - Real-Time Display application, UM / VLT-MAN-ESO-14100-2108
[RD5]  / NGC Optical DCS – User Manual / VLT-MAN-ESO-13660-4086
[RD6]  / NGC Infrared DCS – User Manual / VLT-MAN-ESO-13660-4085
[RD7]  / CCS Engineering Interface And Graphical Tools / VLT-MAN-ESO-17210-3816
[RD8]  / Linux Installation Manual / VLT-MAN-ESO-17200-2009
[RD9]  / Installation Tool for VLTSW Packages – Maintenance and User Manual / VLT-MAN-ESO-17240-1913
[RD10] I / INS/Base ICS User Manual / GEN-SPE-ESO-19400-0794
[RD11] / Base Observation Software Stub / VLT-MAN-ESO-17240-2265
INS Startup Tool – User Manual / VLT-MAN-ESO-17240-2153
[RD13] / VLT SW Environments – Common Configuration / VLT-MAN-ESO-17210-0855
[RD14] / INS Common SW for Templates – User Manual / VLT-MAN-ESO-17240-2240
[RD15] / HOS / Broker for Observation Blocks – User Manual / VLT-MAN-ESO-17220-1332

1.7  Guidelines for Reading this Document

Since the course is based on using the SW completely in simulation mode on the IWS and/or on the LCU, it is possible to use the course notes as a self-tutorial/training session. All what is needed to do this, is the availability of the latest VLT SW release and a suitable Linux box with the proper Linux version installed and a VxWork based LCU.

Additional background information is provided in the exercise instructions in info boxes as shown here:

Information

These boxes can in principle be skipped while carrying out the exercise, but they provide important/useful information that will help the course participant achieving more in-depth information about the VLT SW and the environment as such, and should help to provide a better overview of the system. It would be good to go through this at some point in time …

Disclaimer: While preparing this document, we have tried to make the descriptions as accurate as possible. Nevertheless, the document contains many details and thereby there are many possibilities for mistakes. If a mistake/type/error is found in the document, whilst for instance applying this document for a self-study tutorial, we kindly request that this discrepancy is reported to the authors, to enable us to keep the document as correct as possible.

The exercise is based on the “xxins” module version 5.46 and it might also be that due to changes, e.g. in the configuration of the Template Instrument, that details in the document could become obsolete over time. We will try to keep the contents up to date and as compatible as possible with the current VLTSW Release. This exercise will be using a patched version of VLT2008.

Note also that due to time constraints, it is only possible to cover a part of the INS Common Framework.

2  Overview

This chapter contains an overview of the fictitious instrument (Exercise Instrument) that will be built during this exercise. In addition information about the VLTSW development environment is given, i.e. the details to set up a running environment are explained.

2.1  The Instrument

The Exercise Instrument is a near-infrared imager, equipped with a narrow-band filter and a mosaic of 2 Hawaii RG detectors with a size of 512x512 pixels and a physical gap of 20µ. The light passes one filter wheel before reaching the detector. It has a calibration unit composed by a technical detector, one sodium lamp, one halogen lamp with intensity control and one dichroic mirror. The cryogenic variables (temperatures, vacuum, etc) are monitored by a Yokogawa controller. There is an entrance shutter to protect the instrument optical components from dust. This instrument is intended for the VLT at the Cassegrain focus.

2.2  Hardware Architecture

2.2.1  Devices

The Exercise Instrument is composed of the following components:

·  6 devices, controlled by the ICS on 1 LCU:

·  2 motors.

·  1 entrance shutter.

·  2 lamps.

·  1 DAQ unit (Yokogawa).

·  1 scientific detector:

·  1 NGC controller (infrared SW).

·  1 technical detector:

·  1 NGTCCD.

2.2.2  Computers and Hardware

The Exercise Instrument is using the following computers and HW[1]:

·  Instrument WS (running in a virtual machine). Environment name: “winsx”.

·  ICS LCU 1. Environment name: “linics1”. Installed boards:

·  1 Motorola MVME-6100 PowerPC CPU.

·  1 MEN VME carrier board A201S.

·  1 ESD CAN 04.

·  1 MACCON MAC4-INC.

·  1 Servo Amplifier Board VME4SA.

Figure 1: Devices of the Exercise Instrument.

2.3  Software Architecture

The SW architecture that will be built when going through this exercise is depicted in Figure 2.

Figure 2: The Exercise Instrument SW Architecture.

The instrument ID is “INSX” and its prefix “in”.

The starting point for the development is the Template Instrument [AD5]. The Template Instrument is provided by the VLTSW Package, within the scope of the Instrument Common SW (INSCSW), as an example/demo instrument, which can be used as starting point for developing new instrument control SW.

The “Template Instrument” and the “Exercise Instrument” have the following configuration:

Instrument Name / Template Instrument / Exercise Instrument
Instrument ID / XXXX / INSX
Prefix / xx / in
Instrument User / xxxx / insx
Instrument Manager / xxxxmgr / insxmgr
WS Environments / wxxxx, wxxtcs / winsx, wintcs
ICS LCU Environments / lxxics1, lxxics2 / linics1
Detector Systems / IRACE, TCCD, FIERA, NGC/IR / NGC/IR, TCCD
Detector LCUs / lxxtccd / None (LCU Simulation)

Note that the Template Instrument comes with many devices, more or less, all possible devices and detector systems supported by the ICB. During this exercise, all of configuration information related to the devices not existent in the Exercise Instrument will be removed from the various configuration files.