Renewal of the 3.5m telescope control system

Karl Zimmermann, Rainer Wolf, Josef Fried

Max Planck Institut für Astronomie, Heidelberg




Reason for renewal

The 3.5 m telescope went into operation in the early 1980's. While the mechanics is still working nicely, many electronics and computer parts are at the end of their lifetimes. Changes in technology have made replacement of parts increasingly difficult in the last years: many parts - neither original nor equivalent ones - are simply not available anymore. In order to avoid losses of observing time due to technical failures it was decided to renew the telescope control system completely, i.e. to replace computer, bus system and practically all electronics hardware.

Concept of new control system

The original control system consisted of one central LSI 11 computer which was connected to the various drives and control units with an extended DMA bus system. The new concept of the telescope control system, devised by R.Wolf, is drastically different. It uses a workstation from SUN Micro-systems, Inc with standard Solaris operation system as a host for 5 VME computers which control the drives. The workstation also serves as a router to the public Calar Alto network. A linux PC is used for the communication with the operator through a graphical user interface. All computers communicate with each other by a private ethernet network, not accessible directly from the outside.

The VME's are located at different places close to the corresponding telescope electronics. These are: main electronics rack (second floor), operation desk (control room), yoke mounting (yoke structure), tube (inside of the telescope tube),and coudé mirror S5 rack (floor of the coude plant). The linux PC is located in the main desk. A second communication between VME and SUN is established by Nport servers (bidirectional protocol converters between ethernet and the RS232 console port of the VME's) which is useful for software development and debugging. Additionally each VME has a real time clock interface board (RTC) fed from a central GPS clock. The vme system installed in the control desk is shown here.

The cycletime of the IO-system has been set to 20 Hz for a sufficient realtime response to changes and events triggered from hardware.

The software is organized in several layers. The first layer is the interface to the observer/staff (GUI), which allows the selection of 5 operation modes: The second layer controls the telescope drives which are right ascension, declination, focus, cassegrain flange, coude S5 mirror azimuth and elevation and dome setting. This task computes 4 times per second all necessary astronomical and internal used data derived from the drivers input like encoder values, universal time, airmass, updates the pointing correction, the refraction etc.

The third layer acts as instrument protection. It controls limit switches, stop positions and current state of the drives. It also builds the interface to the drivers, which are found in the layer below the instrument protection. A watchdog monitors all five vme-systems and the tasks running on them and programs running on the SUN by executing a live check every 4 seconds. If all systems respond within the expected time, the watchdog is resetted and repeats the system check 4 seconds later. If not, the electronics of the drives and system power of the vme's is shut down. The system is shut down also in case the watchdog process itself crashes.

A basic part of the software is the telescope database which is built from the input data of all 5 vme-systems and which contains values computed from the input data by the drives control task. As mentioned earlier this telescope database is availabe in each of the 5 vme-systems and the SUN-workstation. The update rate is 20 Hz.

The most important data of the telescope database are mirrored to an epics database. This database is used as interface to the observers GUI and also as interface to the instrumentation software. The epics interface enables the observing instrument to interact with the telecope, in detail: move the telecope to new positions, execute small offsets, move the telescope focus absolute or relative, turn the cassegrain adapter, read telescope data like hour angle, delta, universal and sideral time, airmass, focus positions, cassegrain adapter angle.

At the moment the telescope is controlled by a Graphical User Interface similar to the one which was in use before renewal of the telescope control system. This GUI (see Fig. 3) offers all the functions which an observer needs to control the telescope. The observer can select an operation mode, turn the main drives on/off, enter coordinates for new positions and move the telescope to the new destination, move the focus, control the telescope tracking, control the dome tracking (manually or automatically), control the mirror covers and light baffle and display all neccessary data.

Staff and maintainance operations

Operations which are reserved for the staff are: A lot of functions, which have been built into the new version of the GUI, have currently to be executed by entering a scriptname, e.g. balanceStart. These functions will finally be incorporated in the GUI.

Realization and current status

Since the telescope control system is very complex, we decided to split its renewal into 2 phases. Phase I comprises replacement of the computer and bus system, phase II replacment of the motor controls including the closed loop control of the drives in hour and delta. The problems of phase I are mainly to establish a stable operation of the computer system and furthermore to supply all functionalities of the system.

After careful preparation, installation of hard and software for phase I was done in April and May 2004. It became clear very quickly that the concept is a sound one, the losses in observing time due to problems with the telescope control system were on the order of less than an hour per night in the beginning. Logging of telescope actions and analyzing errors and failures quickly led to enormous improvements. As of December 2004, phase I is now in a stable state, all functionalities required for astronomical observations are working.

To terminate phase I, we need to incorpate read out of temperatures at several positions in the telescope (these are needed for temperature compensation of focus) and pressures in the hydraulics. The GUI is preliminary and will be replaced by one which includes observational as well as system service functionalities. Change of the front ring, which is currently done manually, also has to be automized. We intend to finish this early 2005. Further items are improved diagnostics and error recovery, new observer interface to telescope software, independent of epics.

A major task is instruction/education of the staff on Calar Alto and especially documentation. One of us (K.Z.) will spend some time to introduce the Calar Alto personnel to the new system. It is obvious that providing a good documentation means a major effort, but will shorten telescope down time and so pay off finally. Some documentation of the new system already exists, and we intend to finish documentation with the help of Calar Alto staff next year.

Phase II comprises replacement of the motor control electronics for the drives of the Cassegrain flange, the focus and hour and declination. Usage of modern digital output stages should lead to relatively straight forward solutions for the drives of cassegrain and focus. Problematic are the hour and declination drives which each have a closed loop control to ensure tracking capabilities. Each of these control systems actually consists of 3 nested loops. It is obvious that such systems are prone to unwanted oscillations and require careful finetuning. We are currently analyzing where and how to replace old analogue electronics with modern digital units without changing the logic and structure of the loop system.


Karl Zimmermann
Josef Fried
December 2004