A new Mössbauer spectrometer based on a CompactRIO platform was developed. The CompactRIO is a modular industrial computer platform developed by the National Instruments. This device runs under “LabVIEW RT OS”-Linux-based real-time operating system, which has a support of the LabVIEW programming environment. The CompactRIO has an integrated field programmable gate array (FPGA), which was used for most critical functions of the developed spectrometer, such as scintillation detector signal acquisition and accumulation of Mössbauer spectra, and for driving a velocity transducer movement using a proportional-integral-derivative (PID) regulation. The velocity transducer modulates gamma rays' energy by movement using the Doppler effect. Precision of this movement is crucial, as it defines whole spectrometer accuracy. More sophisticated algorithms (i.e., PID parameters autotuning and additional Mössbauer spectra linearization methods) have been implemented on the real-time part of the CompactRIO. The developed spectrometer demonstrates the advantages of the real-time systems such as deterministic processing of large amounts of data allowing measurement in a very high velocity resolution.