The ESI Spectrograph Online Documentation

Galil DMC-1500 Series Motor Controller Software Overview

The Galil DMC-1500 motor controller software has three separate tasks:

Three separate processes running on the controllers provide the means of handling the requirements of these tasks. The "bekins" process handles external and internal requests for hardware control. The requests can either arrive via commands on the controllers main serial port or from the "uhaul" process which watches the controller's manual control paddle for manual control requests. A final process called "monitor" watches and controls the electronics environment. It does this without any communication with "bekins" or "uhaul". The status of these processes can be seen via the "CTRLxBEK", "CTRLxUHL" and "CTRLxMON" keywords, where "x" is the the unique id number of the controller, i.e "CTRL0BEK".

The Galil DMC-1500 motor controller software services hardware control and status requests from external sources, i.e the dispatcher2 process or someone at a console window, via a command sequence that usually involves setting a few internal variables on the controller, then telling the controller to execute a special interface routine that processes the request specified by the values of the internal variables. Requests arrive on the controller's main serial port and responses to the requests are returned via this port. These interface commands to the controller are normally handled by a dispatcher2 process that opens a connection to the controller's serial port. The same commands can be sent from a console window connected to the serial port. The easiest method of providing a console window connection is via a telnet session through the terminal server connected to the controller. You can connect a serial terminal directly to the controller if you like doing things the hard way.

The Galil DMC-1500 motor controller software is written in a special language developed by Galil for the DMC-1500 series of motor controllers. The software is written as a series of routines in separate source files that are preprocessed combined at build time. The source files include automatically generated include files that describe the hardware, based on information in the instrument database. The source files are run through "cpp", the C preprocessor, to resolve include links, defined macros including constants, and any other preprocessor commands provided to simplify the code. The command space on the controller is limited, so a special program called "squishIt" was developed at Lick to squeeze as many controller commands into this limited command space as possible. "squishIt" is called by the makefile during the build process. Another special program called "download" was written to assist the install process. It makes a serial connection to a controller and downloads a software image to that controller.

Both "squishIt" and "downaload" were written in C. They were developed and tested on Sun systems running Solaris. They have been built, but not tested on Linux systems. They were designed to be as platform independent as possible. They can be built with little or most likely no modification on any machine with a C compiler and standard set of libraries.

The Observer documents are hand-written. The Technical Documents are produced from plain text files in the CVS source tree by some Tcl scripts written at UCO/Lick Observatory. The Reference Documents are mostly generated by software from data in a relational database. Individual authors are responsible for the content of the Observer and Technical Documentation. The Lick SPG as a whole is responsible for the content of the Reference doco. Send mail to de@ucolick.org to report inconsistencies or errors in the documentation.