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 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 (The encoder). The opened or closed position of the dome is read via the limit switches (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 errorcodes.
References/APIs¶
The Station class which serves all the rest:
-
class
mascara_control.
Station
(**kwargs)[source]¶ Class representing the MASCARA station (all interface with the hardware is here)
-
cleanexit
(turnOffStation=False)[source]¶ Cleanexit is a tentative routine to exit the station properly: meaning closing safely all the serial port connections, saving the measurements if some were taken, etc.
-
close_dome
(timeout=25, writelog=True)[source]¶ Closes the dome Keywords:
timeout: integer (default 25 sec) writelog: boolean (default True)
-
close_rh
()[source]¶ - Short routine to close properly the serial connection with
- the RH sensors.
To be updated with the other serial connections?
-
get_pdu_status
(arr=False)[source]¶ Gets status from the PDUs and transforms them in 2 x 8-bit integers
-
get_status
(verbose=True, writelog=True)[source]¶ Checks for all possible (known) problems and returns a code representing the status
-
is_dome_closed
(updateDomePosition=True)[source]¶ is_dome_closed checks that the dome is properly closed
-
is_dome_open
(updateDomePosition=True)[source]¶ is_dome_open checks if the dome is open using the limit switches and the position of the encoder.
-
onoff_code
¶
-
open_dome
(timeout=25, writelog=True)[source]¶ Opens the dome Keywords:
timeout: integer (default 25 sec) writelog: boolean (default True)
-