This "Tecnai-Server" is a supplementary TEM server used to control an FEI machine: Tecnai TEM, Titan TEM, or an integrated camera, via the instamatic software. It can be used in lieu of the full instamatic on computers that do not support modern Python. It has been tested on an FEI Tecnai G2 and an FEI Titan 80-300 microscope. The program provides access for the instamatic software to the com-scripting interface of the TEM.
The server software was developed in a Python 3.4 software environment (Windows XP). Following you have to install the Python 3.4 software package on your microscope-PC. The additional needed software-side packages and their last versions confirmed to work on Windows XP are:
comtypes– version 1.2.1 (link);pip– version 19.1.1 (link);PyYAML– version 5.1.2 (link);typing– version 3.10.0.0 (link);
If you furthermore intend to use instamatic-tecnai-server to interface an integrated camera:
numpy– version 1.15.4 (link).
The packages can be installed using pip, either automatically (if connected to the internet) or manually, by downloading, copying, and pointing to the wheel files linked above. Furthermore, the FEI com-scripting interface should be available on your TEM-PC. It is most convenient to create an installation in a custom virtual environment, e.g. using conda, on a removable or shared drive.
On the Microscope PC, install this script. On the camera and/or support PC, install instamatic software. Follow example configuration 2 or 3 from the documentation. The instamatic GUI instance on the camera PC will communicate with "Tecnai-Server"-software over the network.
The "Tecnai-Server"-software is provided as a standard python-program. You can download and install the software in your chosen directory on the microscope-PC. After you have opened an MS-DOS command prompt you are navigating to the installation directory. The server will be started by the usual python invocation py tem_server.py. An integrated camera, if used, can be accessed using analogous py cam_server.py. A corresponding start.bat file provided in the installation directory can be adapted and used to run the command(s).
The software will be configured by the .yaml-files in the utils-subdirectory. For instance the correct network address of your microscope-PC is set in the settings.yaml file. The magnification table of your TEM or the scripting interface tecnai are saved in the microscope.yaml file.
In our experimental setup the instamatic software is installed on a separate PC (camera PC). In this case the configuration files of Instamatic must be adapted like in the server software. Especially the interface=tecnai, the microscope, the network address and the flag use_tem_server should be verified. Afterward, the instamatic software should be starting without errors on your PC. You can use an IPython shell (instamatic.controller) to test if the TEMController-object has access to TEM.
Thanks to Steffen Schmidt (CUP, LMU München) for providing the original script.