Implementing an SPM Controller with LabVIEW
Jianghua Bai, John L. Freeouf, Andres La Rosa
Portland State University, the Physics Department, USA
Abstract: The purpose of this article is to reduce the barrier of developing house made SPMs. Here, we
cover all the details of programming an SPM controller with LabVIEW. The main controller has three
major sequential portions. They are system initialization portion, scan control and image display portion
and system shutdown portion. The most complicated and essential part of the main controller is the
scan control and image display portion, which is achieved with various parallel tasks. These tasks are
scan area and image size adjusting module, Y-axis scan control module, X-axis scan and image
transferring module, parameters readjusting module, emergency shutdown module and etc. A NI7831R
FPGA board is used to output the control signals and utilize the Z-axis real-time feedback controls. The
system emergency shutdown is also carried out by the FPGA module. Receiving the shutdown command
from the main controller, the FPGA board will move the probe to its XYZ zero position, turn off all the
high voltage control signals and also eliminate the possible oscillations in the system. Finally, how to
operate the controller is also briefly introduced. Messy wires fly back and forth is the main drawback of
LabVIEW programming. Especially when the program is complicated, this problem becomes more series.
We use a real example to show how to achieve complex functionalities with structural programming and
parallel multi-task programming. The actual code showed in this paper is clear, intuitive and simple.
Following the examples showed in this paper, readers are able to develop simple LabVIEW programs to
achieve complex functionalities.
Keywords: Scanning Probe Microscope (SPM), LabVIEW, FPGA, Multi-task Programming, Real-time
Control
1. Introduction
Scanning Probe Microscopes (SPMs) are important tools in modern nanoscale research. House-made
SPMs are popular because they are versatile, flexible, and able to perform non-standard measurements.
Although SPMs can be used in quite different fields, the major technologies to build an SPM are similar.
Usually, an SPM is made with a sensor which measures a certain kind of information about the sample, a
piezo tube or piezo stage to manipulate the XY scans and control the distance between the tip and the
sample (Z motion), a sensor signal processing unit which picks up the sensor signal and feeds it to the
control system, a control system and data processing system and other support electronics. See Fig 1.