Repository logo

When you want it done right now: Experience from programming hard real time systems in Xenomai for the Magdalena Ridge Observatory interferometer

Published version


Conference Object

Change log


Seneta, EB 
Young, JS 
Buscher, DF 
Ligon, ER 
Etscorn, D 


Xenomai is a hard real-time operating system suitable for many low-latency tasks encountered in astronomical instruments. It is open source, has microsecond-level response time and coexists with the Linux kernel, thereby facilitating the execution of hard real time code on Linux systems. This presentation presents experience coding systems with Xenomai for the Magdalena Ridge Observatory Interferometer. Firstly an overview of Xenomai is given, focusing on how it achieves hard real time performance and how it can be used to interact with hardware using Linux-like device drivers. Secondly, a generic outline of the development process is given, including the mindset needed, general pitfalls to be avoided, and strategies that can be employed depending on how open the hardware and any existing source code is. Two specific case studies from the Magdalena Ridge Observatory are then presented: Firstly, the fast tip-tilt system, which must read out a 32x32 subframe from an EMCCD camera, determine a stellar image centroid and send a correction voltage to a tip-tilt mirror at up to 1kHz. Secondly, the MROI delay line metrology system, which must read laser metrology position data for ten delay line trolleys and send correction voltages to their cat’s eyes at 5kHz. Finally, some future challenges to development with Xenomai and other hard real time operating systems are discussed: processors with functionality such as system management interrupts that are beyond operating system control, and the trend towards buffered or closed interfaces between computers and hardware.



Xenomai, real time, instrumentation, interface, servo, Magdalena Ridge Observatory Interferometer, MROI

Journal Title

Proceedings of SPIE - The International Society for Optical Engineering

Conference Name

Software and Cyberinfrastructure for Astronomy VI

Journal ISSN


Volume Title





All rights reserved
New Mexico Institute of Mining and Technology (INT-403-CON-0128)
New Mexico Institute of Mining and Technology (P0015540)
Grant from New Mexico Tech, a university in the United States of America. The ultimate source is the US Air Force Research Labs. It is in the process of being imported into Simplectic.