Personal tools
You are here: Home P200 Echelle ECHELLE Software User Manual DBSP Sofware Diagram
Document Actions

DBSP Sofware Diagram

by Marco Bonati last modified 2005-06-14 03:18 PM
Software Diagram

The software diagram below gives a rough idea of how the software works. It does not pretend to be complete, it is just a general overview.



software diagram


Figure 1: software diagram

Both BLUE and RED sides are mostly identical. We will explain one side here, and all of it will apply to the other side, except  where explicitly stated otherwise.  All the software described here runs on the acquisition host, unless stated otherwise.

Server

As explained in the general introduction, the software consists of two ArcVIEW servers (one per side) that can run synchronized or independently.
There is a software module that controls the detector controller (Detector Head Electronics, or DHE), sending commands and receiving responses and data (an SDSU module for the BLUE side, and an EDTP11W module for the RED side). The data being read also gets sent to a Real Time Display module that sends the data to an external display program (ximtool, SAO or DS9).

Temperature control is different on each side. The RED side only allows reading the CCD temperature, and this is done through the FHH detector controller, which means that for this side the "temperature module" is the DHE module itself.
The BLUE side has a Lakeshore temperature module that controls/reads the Lakeshore temperature controller. This module allows adjustment of the CCD temperature setpoint, filters readings, generates asynchronous alarms, etc.

There is also a module that is connected to the Telescope Control System (TCS) of the 200 inch telescope through a network socket. This module reads status info from the TCS (RA, DEC, HA, UTC, etc) for inclusion in the image headers. Although this module allows full control of the TCS (telescope motion, focus, etc), the only operations currently being commanded from here are turning the flatfield calibration lamps on and off.

There is a separate program called the Serial Monitor, which listens through the serial port of the PC. When the aperture or red or blue camera filter changes, a message is received through the serial line from the instrument microcontroller. The Serial Monitor reads the message and reports the change through two networks ports, one for blue side changes and one for red changes. Each ArcVIEW server has a module that connects to the corresponding port, and in this way filter/aperture changes are reported back through the server to the client (GUI) and stored for insertion in the image headers.

Using information from the DHE module, the TCS, the temperatures, the aperture/filter info, and any "custom header" stored in a file template, the FITS module on the ArcVIEW server writes a fits format image with full header information.

Directory path and status information for any new fits image written to disk gets stored in an internal ArcVIEW database. This database module on the ArcVIEW server has its own network port; using this port another machine (the reduction host) can run a program called an "image puller" to get the needed information to transfer the fits image from the acquisition machine using SFTP protocol.


Clients

The ArcVIEW servers have network ports that accept client connections in order to send commands and/or receive asynchronous messages. All the commands that ArcVIEW accepts are ascii.

A client can connect in "full-connection mode" or in "blocking mode."
A fully-connected client will connect to a command port, and also to an asynchronous message port. In this way it will be able to send commands and receive immediate responses, asynchronous messages, and callbacks.
A blocking client will connect to a single port and send commands in a "blocking" state, which means that it will send the command but will not get any response until the command is done, even when the command takes a long time to execute (the EXPOSE command, for example).


software diagram


Figure 2: synchronization detail

When running synchronized, the BLUE server  establishes a full-connection to the RED server. Every command sent to the BLUE side can then be (if specified) replicated to the RED side (the BLUE server just sends the commands as any other client would do; the RED server does not know what kind of client it is). In this way, a client connected to the BLUE side can send commands to blue-only, red-only, or both sides. A client connected to the RED side can only send commands to the RED side. In this sense, we say that the BLUE side is acting as a master, and the RED side as a slave. When running in synchronized mode, then, this is what is happening: some of the commands that the blue client sends (like EXPOSE) get replicated to the RED side, causing both system to act in sync. See figure 2

In DBSP, both GUIs are fully-connected clients. The BLUE GUI gets fully-connected to the BLUE ArcVIEW server, while the RED GUI gets fully-connected to the RED ArcVIEW server. In this way, every button that the user presses gets converted into an ascii command that is sent through the command socket to the corresponding server. The second, asynchronous connection, allows the client to receive updates (like "exposure done", or "aperture changed"), alarms, etc.
When running in synchronous mode, then, the BLUE server has 1 full-client (BLUE GUI), and the RED server has 2 full-clients (RED GUI and BLUE server).See figure 2

A script acts normally as a blocking client, in the sense that it only connects to the command port and executes all the commands sequentially. Because DBSP has two ArcVIEW servers, a script can send commands to one side or the other to handle them independently. However, if the systems are connected, a script sending commands to the BLUE server can also handle the RED side. This makes it possible for a script to handle the whole DBSP instrument.
See the scripting section for more information regarding scripts.