.. _control: ==================== The Control software ==================== The control software is the program in charge of the MASCARA station and which makes it completely robotic. The MASCARA station hosts **N+1** computers, where N is the number of cameras. The camera computers are each in charge of one camera. They are responsible for the cooling-down of the cameras, the acquisition of the images at the right time, and the reduction of the images during day-time. However the camera computers depend to the control computer for starting an acquisition sequence: no point exposing if the dome is not open. Thus the control computer, which is the one hosting the control software, is monitoring the various sensors of the station, and the weather stations available. Station status control ====================== The control of the station's status is done real-time, by reading every seconds the status of the various sensors used by MASCARA. A detail on the sensors and how to read then can be found in the :mod:`electronics` module. Here we shall concentrate on how the station is self-checking its status and how. The moving parts ---------------- MASCARA has a moving dome, and a door. As a result, it is important to verify the status of those parts every time: * the dome position should always be either closed, or open. Only for a short period of time is the dome in-between those positions. * the dome is always closed. If the door is open, it means that the station is in maintenance mode, and the dome should not move (for security reasons). The door can only be opened manually. But the dome is opened and closed via two rotation motors. The motors don't know of their positions. Thus the position of the dome while moving is read via the encoder (:ref:`encoder`). The opened or closed position of the dome is read via the limit switches (:ref:`limit-switch`). One limit-switch for the closed position, and one for the opened-position. The electronic parts -------------------- The control software reads at high cadence the measurements of the following sensors: * the temperature and humidity sensors * the limit-switches. The status ---------- At any time, as a function of the read-out of the sensor, a status code is returned describing the state of the station, and the potential error occuring. The detail of the error codes can be found in :ref:`errorcodes`. References/APIs =============== The Station class which serves all the rest: .. autoclass:: mascara_control.Station :members: :undoc-members: