An early beta-site tester of NI's new LabVIEW 7 Express software is
reporting considerable success following the use of the software's Real
Time and FPGA modules in a high precision controller application
The Swiss company Nanonis has developed an all-digital control system for
a scanning probe microscope (SPM), based on the latest version of
National Instruments' LabVIEW (7 Express) software and PXI hardware. The
mixed analogue and digital control systems that are currently in use are
bulky and difficult to use. Nanonis wanted something more flexible and
easier to use that also offered an intuitive user interface, so it set
about implementing the entire system in software.
Atomic force microscopes are remarkable devices that scan the surface
topography of a sample with an extremely fine tip. Their resolution is
down to the atomic scale. 'SPM' is a broader term describing other, more
sophisticated methods, including the registration of magnetic signals and
mechanical parameters such as friction.
Users commonly perform these methods in the dynamic mode; the tip
oscillates above the sample surface and any force between tip and surface
influences the oscillation, particularly its frequency and Q-factor. When
a change is detected, a feedback loop adjusts to tip/sample distance to
maintain non-contact operation. Needless to say the response of the
control system must be very fast indeed. The distance and speed at which
a tip scans a surface to resolve individual atoms, is comparable to a
Jumbo Jet flying at cruising speed at an altitude of 1mm over the earth's
surface!
The Nanonis team chose the PXI hardware platform - which has become a
recognised standard in industrial PC based measurement applications -
while the time-critical control algorithms were implemented in LabVIEW 7
Real-Time Module running on a 1.26GHz CPU in the PXI chassis. Algorithms
were developed for the raster scan generators, the tip/sample distance
controller, data acquisition and other auxiliary time-critical loops.
The user interface was also programmed in LabVIEW 7 Express and runs on a
remote machine connected via Ethernet. The LabVIEW 7 FPGA
(field-programmable gate array) Module was used to develop algorithms
that needed to operate in the Megahertz range. Using this module, the
team developed algorithms for implementation in hardware simply by
writing LabVIEW code, which is actually very similar to signal flow in
hardware. It was thus logical for the team to use it to describe
programmable hardware and download it to the chip. This also enabled the
controllers to be shifted from the real time engine to the FPGA when the
most time-critical demands had to be met.
A phase-locked loop (PLL) was installed on the PXI-7831R reconfigurable
I/O board, and in the first implementation, PID controllers were run for
phase and amplitude on the real time engine, reaching a demodulation
bandwidth of up to 3kHz. The complete PLL was then implemented on the
FPGA. With onboard 16-bit A/D and D/A converters running at 200
kilosamples/s and a 32-bit accumulation phase register, a demodulation
bandwidth of more than 10kHz was achieved.
The digital interfaces of the PXI-7831R offered the team great
flexibility. After initial tests, it is confident of achieving 24
megasamples/s with a frequency resolution down to 0.1 microhertz - an
accuracy that is simply unattainable with analogue methods. Another key
advantage of the digital approach is the ease with which the demodulation
bandwidth can be adjusted - from more than 10kHz down to the millihertz
range for the highest resolution.
According to Nanonis' Dr Jorg Rychen, the intrinsic parallelism of
LabVIEW was key to writing efficient, structured and modular code without
any knowledge of FPGA programming languages, such as VHDL. By seamlessly
integrating our existing real time controller with FPGAs, we c