A LabVIEW based template for user created experiment automation

We have developed an expandable software template to automate user created experiments. The LabVIEW based template is easily modiﬁable to add together user created measurements, controls, and data logging with virtually any type of laboratory equipment. We use reentrant sequential selection to implement sequence script making it possible to wrap a long series of the user created experiments and execute them in sequence. Details of software structure and application examples for scanning probe microscope and automated transport experiments using custom built laboratory electronics and a cryostat are described. © 2012 American Institute of Physics . [http://dx.doi.org/10.1063/1.4770121]


I. INTRODUCTION
Systematic research generally requires experiments with repetitive controls, measurements, and data logging.Frequently, the laboriousness of manual measurements causes delay, errors, and irreproducibility.2][3] In this paper, we present a easily modifiable LabVIEW based template for experiment automation by sequence script.The template has a very simple stacking structure which allows users to create their own experiments in LabVIEW and sequence them.We propose two application examples.First, we build a executable scanning probe microscopy (SPM) control program for manual operation within a framework compatible with the LabVIEW template, and then explain how to use the template to make a long sequence of experiments done automatically.Second, we describe how to build experiment automation with the Quantum Design PPMS (Physical Parameter Measurement System).Even though PPMS comes with its own software platform supporting its own script automation, the solution is not comprehensive enough for executable third party equipment integration and has only limited PPMS control access. 4owever, when an external program such as LabVIEW accesses the system, there is interface conflict with its own software. 5This is especially critical for mK options.A reliable interface traffic control method and demonstration of the custom built hardware integration with the template are presented.

II. PROGRAM CONCEPT
The overall structure of the template is a sequential case structure in a while loop.The experiment automation is implemented as a part of the sequential case structure in Fig. 1(a).Execution of the sequence script generates a process.Then, the sequence script line split counts the number of sequences to execute by splitting a long sequence script which has a series of executing routines for them as shown in Fig. 1

(b).
As shown in Fig. 2, a single line of script is parsed into elements by counting the number of characters and leads a head instruction which is fed to select a corresponding case in the sequential case structure (setT in Fig. 2), and the corresponding parameters are extracted by the same method to feed into the case (setting temperature, rate, and approach method in Fig. 2).More complex control, data logging, or measurements can be easily implemented in the same way.So, by simply stacking a series of sequences, it is possible to execute them in a series.Since each sequence can be made and managed separately, it facilitates maintaining and sharing the user created experiments in the framework of the template.The template can be used as a sub-program as in the SPM application or a main program as in the PPMS application.

A. Scanning probe microscope
We explain how to automate sophisticated SPM experiments based on the LabVIEW template.Well designed low temperature SPMs 6-9 make it possible to place and maintain tips very precisely at desired positions for long times.][12][13] The reproducible positioning is usually made via amplified output of digital to analog converters (DAC).The requirements of high speed and high stability of DACs limit the design to use commercial 16 bit systems.But single 16 bit DACs covering large tip accessing area can be problematic.Therefore, it is necessary to separate offset and scan voltage and represent both in a unified user interface scan and tip position window.Figure 3 shows the scan tab of our SPM program.The upper left window in the tab is for scanning and tip positioning.This window consists of 655 360 × 655 360 pixels.After tip approach, this window represents the whole area which the tip can access.
Figure 4 shows the functionalities of the scan and tip position window.The white dashed square area represents the scan area and can be expanded up to the whole area or shrunk one bit square.The yellow cross mark can move any place in the whole area by adjusting XY offset voltages.By moving the yellow cross mark, the user can get topography at any place with any size, and zoom in and out functionalities support from single atom level experiments 10 to large area analysis 11,12 with conserved coordinate information.The red cross represents fine motion of tip which can be used for local spectroscopy and atomic manipulation, and the fine motion is limited only in the scanning area up to 100 times better tip positioning resolution.This ensures much better lateral resolution and flexibility in experiment implementation.
The first step is to make a raster scan routine.A SPM maintains the distance between surface and tip with feedback electronics and uses the raster scan recording voltage signal of Z piezo actuator to represent the topographical informa-FIG.5. Smooth raster voltage ramp avoiding tip crash.
tion.The scanning is executed point by point in a single line and then 2D image is made by stacking up the lines.One important concern is a line scan with big jumps between acquisition points where the tip has significant possibility to crash the sample surface even if the feedback is fast.This is a complicated problem which includes many other issues such as signal-to-noise ratio and other electronics design.It is advisable to make a point jump with a smooth and continuous voltage ramp as shown in Fig. 5.The squares represent the data acquisition points and the dots are smooth voltage ramp without acquisition between the acquisition points.Therefore, topography on the scan window has much dense tip accessing points than its image resolution.
Using NI analog input and output boards, NI DAQmx is the easiest and most reliable unified driver.There are six subroutines which are most frequently used.If one uses software timed single analog output to generate the voltage ramp, the maximum output rate without any other load is limited to a few to a tenth kS/s.This makes very slow tip movement and scan rate.We propose the first major routine for the template called hardware clock finite voltage generation (C1) as shown in Fig. 6.Basically, it uses an on-board hardware clock to generate a fast and continuous voltage ramp to make the tip move smoothly across the surface without crashing.The sampling speed can be increased up to 1 MS/s.Thus, by repeating C1 in while loops, one can make a complete set of raster scans for both X and Y axes.And hardware clock finite voltage acquisition (C2), as shown in Fig. 7, can follow the C1 to do general purpose data acquisition for topography and tip positioning.
Together with C1, it is necessary to make an array of binary values to feed DAQmx write.For example, if the analog voltage output is to scan from −100 to +100 in two's complementary with 21 acquisition points, one needs to make a 2D array for (−100,. . ., −90), (−90,. . ., −80),. . ., (90,. . ., 100).The values in a bracket are to update the voltage in C1, and each bracket is fed into it.For this purpose, symmetric scan ramp array generator in Fig. 8 is frequently used and designated as C3.The number of brackets is scan size and the number of elements in the bracket is the step size.Thus, the image size is determined by the scan size, step size, and XY amplification and scan speed is determined by output sampling rate, read delay, and interline delay.One important factor is that PCI or PCIe interface boards should be used, otherwise the inter-step delay between each bracket is determined by USB communication reset delay, and it takes more than 2 ms.
For the purpose of tip movement, an arbitrary ramp generator (C4), which has similar functionalities to C3 except for using non-symmetric floating (top in Fig. 9) and integer (bottom in Fig. 9) inputs, is necessary.And a floating to binary converter (C5) supporting floating to binary conversion in Fig. 10 is used frequently for spectroscopy.The final one is synchronous voltage generation and acquisition (C6) which is used to generate and acquire a voltage at the same time (Fig. 11).This is very useful for synchronous IV measurement, 14,15 atomic manipulation, 8 deposition and surface checkup. 11For example, when the surface has oxide islands, the irregular topography could lead to tip crash or contamination on the island areas.Instead of the whole area surface scan, the C6 routine can be used to monitor the surface roughness by monitoring Z feedback voltage value during tip movement and the tip can be positioned on the oxide island with minimum tip contamination for isolated single atomic or molecular spectroscopy.
There are more hardware control routines such as single input and output and hardware clock continuous acquisition for an oscilloscope and low frequency spectrum analyzer, etc., but those are not used frequently for the script automation.The above routines are used most frequently in the main program to control the tip, all physical parameters and to do measurements such as scan, spectroscopy, manipulation, lithography, and simultaneous data acquisition with topography.The hardware control routines are also the major routines for the automation template.Sometimes it is necessary to generate or acquire two or more signal channels simultaneously.For this situation, DAQmx VIs are polymorphic and a vector ramp generator is available.
For example, physical parameter controls and tip movement are implemented by using C1.In the framework of the template, the head instruction of Set_Vol is used to set a bias   sampling rate, and C1, C2, C4, and C5 are used with XY graph.There are more realistic situations where this template can be very useful.Here, we provide three examples.First, assume that a user has a clean surface with magnetic nanoislands and single molecules on it, and the user wants to take very high resolution topography and spectroscopic image simultaneously, which takes 2 h for a subsection, having to get all subsections in the accessible area by moving the offset.This can be done by manually for each subsection.However, when the number of the subsections is more than 10, it is obvious that the automation template can be useful.This can be done by repeating Move_XO (Move_YO), Auto_ZO (auto Z offset), and Scan_TS (simultaneous topography and spectroscopic image).Second, assume that a user needs to conduct local spectroscopy at many points on a pre-acquired topography as shown in Fig. 12.This is called spectroscopy map-ping and takes considerable time to complete, especially over physical parameter changes such as magnetic field.One possibility is to make dedicated sub-program as shown in Fig. 12, and repeat it for each field.But more flexible and easier way is to use the template.Simply by repeating Move_XF (fine tip position), Move_YF, and Lo_Spec, the local spectroscopy measurements can be conducted and magnetic field control also can be implemented easily by using the similar routine of C1 or through other interfaces.
Third, assume a user has a clean surface with many adsorbed atoms and molecules, and the user needs to do atomic manipulation to make some structures.Atom_Mp is a head instruction for the work which uses dual channel version of C6 and the vector generator, set current, sampling rates, delays and C1, C4, C5.Thus, using Move_XF (Move_YF) and Atom_Mp, time consuming atomic manipulation or lithography work can be automated.With a reliable low temperature SPM, this template can be used for countless implementations of experiment automation.Not only these examples but also much more complex experiments with various equipments are possible.Basic head instruction, parameters and used codes are summarized in the Table I.

B. Transport measurement in PPMS
Using the program concept, automation with the script is straightforward for a system consisting of mutually independent subsystems.But when a cryostat system keeps occupying user control resources, the conflict of the resource occupation is an obstacle to the use of automation template.7][18][19] Here we show how to avoid this resource conflict and to build experiment automation for various transport measurements with third party equipment.The PPMS has its own control program of Mul-tiVu for automation with built-in measurement setups.The motivation of our PPMS control software is not to mimic the commercial software but to provide a more powerful automation template which can be easily modifiable and expandable to conduct user created experiments in the PPMS in the framework of the template, and can hook up virtually all kinds of third party equipment with much more flexible data presentation.The overall structure of the control software follows that shown in Fig. 1, the while loop keeps the executions in the sequential case structure.The processes in the sequential case structure designates controls or monitors of temper-FIG.14.Measurement setups.ature, magnetic field, angle, chamber status, and user created experiments and analysis.Each case is triggered by the status of an activation button.The true status of button makes the active process start and the false status makes null process run, respectively.The monitor processes keep running in the top down architecture even during the user created experiments through local variables.This simple procedural driven architecture has the advantage of easy maintenance and reliability.More system controls, monitors, experiments, and analysis can be added by stacking extra processes in the sequential case structure.The automation script is one of the processes in the sequential structure.The PPMS controls are well classified and it is very easy to organize them in the framework of head instruction and corresponding parameters.For an example of temperature control, setT is a head instruction and T = 200, R = 10, A = no overshoot are parameters which set final temperature, temperature ramping rate, and approaching mode.Typically experiments with PPMS are to measure physical properties versus temperature, rotator angle, and magnetic field changes, and therefore seamless access to the temperature and magnetic field control modules in PPMS through GPIB (General Purpose Interface Bus) is essential.However, if the PPMS control and monitor parts are implemented with the built-in GPIB functions of LabVIEW, the control program crashes with MultiVu or other original PPMS software such as the He-3 insert console program which uses the same GPIB continuously.In particular, the milli-Kelvin option cannot be excluded such as MultiVu which can be terminated to avoid the conflict.To avoid this conflict, we implement a direct access to the Quantum Design's GPIB traffic control library.Figure 13 shows the function prototype in the traffic controlled PPMS GPIB communication li-brary and block diagram of Call Library Function node to call functions from the library.The original software of PPMS installs the dynamic link library of ppmscomm.dllat sys-tem32 folder of windows.The GPIB communication function of GpibSend controls the interface traffic when two or more application softwares call it to access to PPMS hardware modules simultaneously and prevents software crash from the interface conflict.A sub VI of ppmsgpib.vi is implemented for the GPIB communication to PPMS in our control software.Using the VI, our control software has no interface conflict problem.Even if the newer version of PPMS has CAN interface, there is an instruction converter so that the same GPIB VI and commands are still valid.In the framework of the template, we have made a multichannel resistance measurement setup with LR700 ac resistance bridge, point contact spectroscopy, tunneling spectroscopy, conductance over gate voltage sweep, and synchronous current to voltage relation setup.The ac bridge interface is straightforward and uses typical GPIB functions.The hardware interface for the others uses the same approaches discussed in Sec.III A for SPMs, USB, and even parallel or serial port.Figure 14 shows frequently used setups with our custom built electronics to cover the general purpose transport measurement in PPMS, and the custom built electronics can be configured for various setups including conductance measurement for gated quantum structures , pulsed or synchronous IV measurement, 4 probe high impedance measurement, etc. Table II  be transferred via global variables to the presentation window as shown in Fig. 16 demonstrating the transport measurement program running.

FIG. 3 .
FIG. 3. The scan and tip position tap of the SPM program.
FIG. 16.Transport measurement automation program based on the LabVIEW template.

TABLE I .
SPM controls and experiments.
a Multilchannel version using polymorphic property of DAQmx.bC9 is a vector generator, and a modified 2D version of C4. c User created measurements with user created acquisition routine using GPIB, USB, ethernet, serial or parallel port, etc. Rev. Sci.Instrum.83,123705(2012) FIG.13.PPMS GPIB traffic control.

TABLE II .
PPMS controls and transport experiments.
a R is resistance, T is temperature, B is magnetic field, A is rotator angle, and C12 is a routine for software timed acquisition.Rev. Sci.Instrum.83, 123705 (2012) FIG. 15.Block diagram of XY (C7) and intensity graph (C8).