Pointing Controller Software ---------------------------- Overview -------- The purpose of this software is to provide a replacement for the aging Telco system. While Telco is still functional, the hardware is more then twenty years old. It fails on occasion and it can be difficult to find replacement parts. There is also the point that computer hardware has advance exponentially since Telco was made, and we can now add several features that would have been impossible when Telco was created. The primary features of the new Telco (now called Poco) would be -It would point the telescope as accurately as possible given the existing hardware. -Poco would be a system daemon that accepts connections from other processes using network sockets. The other process would include, but not be limited to: - The user interface. Multiple user interfaces can be connected simultaneously. - Some form of guide camera system. - dtake or some other data taking system. -Poco would be able to control the Shane 3-meter, the Nickel 1-meter, and the Coude auxiliary telescope without having to have a separate version of the program for each telescope, if possible. -Each copy of Poco would run on a dedicated computer, and each computer would be identical. This would allow any of these computers to easily replace a malfunctioning unit. -Poco would be robust. Poco will not crash, run away, or hang the system. -Poco would not damage the telescope under any circumstances. -Poco's vulnerably to hardware obsolescence will be minimized as much as possible. While Poco will be dependent on the Galil 1800 motor control card, the work involved in modifying Poco to use a different control card will be minimized as much as reasonably possible. -Poco would be constructed so as not to forbid the addition of remote operation and robotic operation at a later date. Program Structure ----------------- To meet the requirements, Poco is coded in C++ using object oriented principles. The program is multithreaded to reduce the likelihood of the program hanging on input from another process or driver. The program itself is divided into three main pieces. These are interface, telescope, and control. The interface is responsible for controlling communication between Poco and other processes either on the same computer or on another computer. The telescope section deals with calculating the telescope and dome positions and movement. The control section communicates with the hardware that moves the telescope and provides the results to the telescope and interface as needed. Each section is represented by a class. The interface section is implemented in the CInterface class, the telescope section is implemented in the CTelescope class and its sub classes, while the control section is represented by CControl and its subclasses. The CTelescope and CControl classes are meant to be pure virtual classes, which means neither can be used directly, but can be used as the basis for another class. The CTelescope hierarchy will eventually include separate classes for each telescope, and possibly separate classes for different instruments. The CControl hierarchy has CControl as the base class and CGalilCard as its functioning child. By using virtual classes it easy to change some important functions or features while still using most of the code across all the child classes, and be able to chose which telescope to control at run time. Program Configuration at Run Time --------------------------------- Poco needs to be configurable at run time, otherwise a single program could not control three different telescopes. To do this a command line argument will specify a configuration file name, and that configuration file will contain the names of the other configuration files to be used. The main configuration file will normally be found in the /usr/local/lick/data/poco directory, and it will point out the other configuration files to use. /usr/local/lick/data/poco/nickel.config might contain telescope_config nickel/telescope.config control_config nickel/control.config interface_config nickel/interface.config instrument_config nickel/insrtument.config The configuration files are organized so that a single line contains a keyword and one or more values. If Poco doesn't find a keyword, it writes the error and terminates. Poco produces error messages, but doesn't terminate, for unexpected keywords found in the configuration file. The Poco configuration files should only need to be changed occasionally, but there is a need to backup current files and keep a history of changes. While nothing has been decided, I think permanent copies of the configuration files should be kept in the CVs software repository, and makefiles, scripts, and possibly cron jobs should be made and used when editing to ensure that a history is maintained. It will take approximately 200 different configuration file variables to properly configure a telescope. It is important to note that some of these wont do much. For example the xaxis.config, yaxis.config and dome.config files for the nickel all contain the same set of keywords and the files are all different. However, the dome axis does not have a true PID loop, since there are no motors accurate enough to control, but Poco has to see values for PID specific keywords. The reason for this is that all the axis (HA, DEC, and dome) use the same code, and it is not entirely unlikely that some dome axis in the future will need to use the true PID loop.