Practice shows that the current impiementations of automatic tuning of transmission elec-
tron microscopes suffer from not satisfactory robustness, and this seriously limits their
applicability. The paper presents a software architecture which provides a framework for
the realization of a real-time automatic tuning system with improved robustness. First
the transmission electron microscope tuning as general measuring/modelling process is
characterized and the consequences of the improvement in robustness are identified in
this context. It is concluded that both extending the models of image formation of the
electron microscope into qualitative and heuristic directions, and the continuous model
validation with sophisticated control are necessary for coping with these problems. Then
a two-layer software architecture is presented which helps satisfying the above require-
ments to a considerable extent: the lower layer contains the conventional and symbolic
data/image processing components (with data/control interfaces), the upper layer - us-
ing knowledge based approach extensively - realizes the higher level control based on the
partial results of the processing on the lower level. (Hence, the upper level is responsible
for the robustness in system-wide sense.) Main subsystems of the autotuning software are
shown. A short survey of the hardware background is also given. A summary closes the
paper