SXM/Anfatec Scan¶
The Anfatec scan software is designed for various applications. It is initialization file based (description of sxm-ini in Appendix 1). All user settings are saved during work and reload when the program is opened again.
In order prepare the program for different applications (e.g. Different experiments in students education), the program can be stored in several directories with separate initialization files or ini-files can be saved to keep settings stored.
Note
All parameter inputs into the program has to be confirmed with ENTER. Wrong number, which can be detected automatically, are marked in red and comments explain what's wrong.
Quick-Start for Anfatec Scan¶
Start the program¶
Double click on the SXM icon
. Each start of program restarts the
SPM-controller. Therefore it is important, that the power supply of the
controller is switched on before the program is started.

When started, the last opened scan windows and the parameter windows are shown.
For everyday use, all necessary channels are already open. For special experiments, you can store the settings (sxm.ini) in a separate file (for e.g. mysetup.ini) and call the program from the desktop with the option of this filename (case sensitive!): '"...\sxm.exe" mysetup'.
Adjust your system (AFM only)¶

-
Adjust the laser on the cantilever
-
Open the crosshairs window
-
Adjust the laser onto the photo detector
The cross hair window shows the position of the laser beam on the photo detector. The "x-value", "y-value" and "intensity" give an idea about the real position. The displayed position can be scaled with the gain knobs.
"Laser" switches the voltage supply for the AFM laser on and off.
The colour of the dot represents the intensity. If the intensity increases, the dot gets green. If the intensity reduces, the dot gets red. Constant intensity is displayed as black dot.
Find the Cantilever Resonance (Dynamic AFM only)¶
-
Open the DNC window

-
Take spectrum
-
Zoom in until the resonance is clear
-
Click into the spectrum to set the set-point for the feedback
Search for Setpoint¶
-
Open the oscilloscope
-
Display the input channel (It for STM, T-B for contact AFM, 'Amplitude' for dynamic modes)
-
Read value (mean value in the oscilloscope)
-
Set the setpoint to a suitable value
For other modes refer to our hints here.
Approach¶
a) manual approach: (not for the Level- AFM)
-
Start the approach button
-
Approach while checking z-position
-
If the system thinks, approach is done and a sound is given.
-
Adjust the z-position in the central z-range

b) automated approach:
This function works only, if a z-translation for the coarse movement is installed. Use the AutoApproach button.
Check approach:¶
Check force distance curve (1 nm to 20 nm distance dependence) with Spectroscopy Window.
Set feedback parameters¶
Set Ki as high as possible. Ki is too high, if the tip starts to oscillate. Kp does not really matter for AFM measurements, but you might set it to a value close to Ki.
Tip
If the tip does not stop to oscillate in dynamic AFM: increase the drive (set setpoint to maximum = soft-retract, increase drive, check free amplitude, set the setpoint to new value).
Acquire Images¶
Start the image acquisition with the scan button:
(the button gets highlighted in orange)
You can change the scan mode when you click with the right mouse button on the scan button. The appearing menu shows:

-
1D: line scan at the first or current line
-
2D: 2-dimensional scan
-
cont. on restart: when checked and you stop the scan, the scan restarts at the line at which it was stopped.
For each window, one can set display options during the scan. Click with the right mouse button into an active window (e.g. "TopoFwd"):

Scan from here up and Scan from here down:
usage: during the image acquisition or in order to start image acquisition
function: uses the current mouse position to determine "here" and starts to scan from this position upwards or downwards. The function does not change or check the setting "cont. on restart".
Reverse Scan direction:
usage: during the image acquisition
function: changes the scan direction from downwards to upwards or vice versa.
Gain and Contrast: changes the gain and the contrast of the used colour range during the scan. Maximum and minimum are taken automatically in Every Line or from the whole Current Picture. In case of Current Picture, all values available from the 1st scanned (might be the uppermost or the lowermost line in an image) to the currently scanned line (visualized with a black or yellow line) are evaluated. In case of Last Picture, maximum and minimum of the last acquired image are taken to calculate the contrast.
Slope: subtracts either a linearly fitted line from each scan line (Every Line) or a fitted plane through the whole currently acquired image from the 1st to the currently scanned line (Current Picture). One can also use the calculated slope from the last image (Last Picture) or disable the slope correction completely (None).
Save images¶
The data are saved in two formats: Anfatec file format and bitmap, that the following files are created:
-
a base file (*.txt)
-
and 2*N data files (*.bmp + *.int)
(N ... number of acquired data channels, each saved as bitmap and as integer).
The file names ('*') consist of:
-
a base name provided by the user (example: "S45B")
-
an automatically generated 2-digit number (example: "00")
-
the channel name written in the image windows (example: "TopoFwd")
-
the file extension.
In the case that two channels called "TopoFwd" and "ItFwd" are acquired, the generated files are:
-
S45B00.txt
-
S45B00TopoFwd.int
-
S45B00TopoFwd.bmp
-
S45B00ItFwd.int
-
S45B00ItFwd.bmp
Each click on the save button increases the 2-digit number by one (next file set: S45B01.txt, ...).
With the OpenLast function [File/OpenLast], the last saved image is opened in a new Present window. You can enable AutoSave with "Shift+left mouse button" on the Save button. The base name of the stored files can be given in [File/Save As].
Hints for setpoint settings¶
STM
If the system is scaled correctly, you can just put in the tunnel current in the parameter window.
AFM contact mode
Set the setpoint to more positive values than in large distance to the sample. Consider, that softer cantilevers need larger values.
AFM -- conventional dynamic mode
Read the free amplitude in large tip-sample distance and set the value to 80 % to 90 % of it. If the tip starts to oscillate, reduce Ki. If no stable feedback is possible, increase the drive amplitude (window) to stabilize the system
Example:
| Category | Parameter | Value / Notes |
|---|---|---|
| In crosshairs | x-value y-value intensity |
-500 … 500 mV -200 … 200 mV 1000 … 6500 mV |
| In DNC | drive gain amplitude in resonance |
2 V 1 70 … 600 mV |
Feedback parameter
-
Ki=15 … 80
(reduce if tip oscillates after approach, increase until oscillation is almost visible ≈ 1 nm ripple) -
Kp=100 … 2000
Parameters during imaging:
-
Start scan with 1 line/s.
-
Increase Ki until oscillations seem to appear.
-
Increase Kp to 3 * Ki.
-
Increase scan speed, until edges on the sample get blunt.
Soft-Retract : set setpoint to a value higher than free amplitude, that the piezo is retracted (LED in UP-position for the HV45B amplifier in the Level AFM)
Dynamic AFM with high resolution
after laser adjustment:
| Category | Parameter | Value / Notes |
|---|---|---|
| In crosshairs | x-value y-value intensity |
-200 … 200 mV -50 … 50 mV 3000 … 6500 mV |
| In DNC | drive gain amplitude in resonance |
0.01 V .. 0.1 V 10 or 100 5 … 150 mV |
-
open oscilloscope
-
check amplitude (= free amplitude)
-
set setpoint (parameter window) to 95 % of free amplitude
Feedback parameter
-
Ki = 15 ... 40
(reduce, if tip oscillates after approach, increase, until oscillation is visible = 1 nm ripple) -
Kp = 100 ... 1000
Channels and their meaning¶
Visible Channels¶
As the hardware provides many version of channels with various scaling and meanings, the huge amount of hardware channels is provided. To limit the "visible" channels for the user, the channels be can switched off in the Scale Window under Options menu.
If a channel is visible, the user can:
-
use it in spectroscopy
-
acquire its data as image in all three scan types
-
select the channel in the oscilloscope for visualization
Acquired Channels¶
These are channels taken as picture data. They are selected in the Acquire window under Options menu.
Calibration of cantilever deflection¶
While the whole system is calibrated for every application, there is one thing which cannot be assumed to be constant: the sensitivity of the laser deflection system. It depends on the cantilever reflectivity, of the mounting of the cantilever and on the cantilever adjustment. While the laser intensity can vary between 1000 mV and 5000 mV, the sensitivity can vary between 0.1 mV/nm and 20 mV/nm (typical values, only). Therefore, quantitative measurements require a system calibration after each change of the tip or the tip adjustment.
This cantilever calibration is done by force-distance curves measured in the Spectroscopy Window's X(z) procedure.

Amplitude calibration¶
One measures the amplitude versus the distance in dynamic mode.The Linear fit button allows the user to fit automatically the first 30 % of the curve. One can manually adjust the fit result, if necessary. After this, a number is displayed above the distance curve and a hint on the number tells: Click to use for rescale. When used, the number changes its colour to green on black.
After this procedure, one might open the DNC windows. Depending on
the mouse position in the white screen, the bottom status bar of the window displays now three numbers:
x: frequency in Hz
y: amplitude in V ~ amplitude in nm
as shown in the image below.


Force calibration¶
Switch to contact mode and measure the normal force versus distance (T-B). Afterwards, the same linear fit allows the user to find the coefficient for the cantilever deflection calibration in contact mode. Usually, these amplitude and deflection coefficients are close to each other, but do not equal completely. Therefore, they are stored as two independent parameters.
By clicking into the provided number (colour change), it is overtaken. After this, one finds the calculated contact force as a hint hovering over the reference entry of the Parameter Window. Here the force is calculated based on the Spring Constant value set in the Feedback window available under Options menu.

The spring constant is k = 40 N/m in the displayed example.
The formula used is:
Force = k / Sensitivity * Reference Value
F = (40 nN/nm) / (3.67 mV/nm) * (50 mV) = 544.5 nN
User Interface¶
When SXM is opened, a Main Window is displayed, within which several child-windows for each image channel exists. The top panel shows several icons offering various functionalities, clicking on one them toggles its display in a separate window. Some of these windows together with the Parameter window are already opened by default (also indicated by the highlighted icons).
Main Window¶
Each acquired channel enabled in the Acquire window (Options → Acquire) is represented by an image shown as
a child-window inside the main window of the scan program. In versions
older than 17h, these windows have been replaced and resized every time
the program has been re-opened.
One can arrange the child-windows automatically by Window → Cascade/Tile menu item.

Starting from Version 17h, it is possible to place the windows with additional functions:

When a window is selected, the cursor key are used to move the window inside the main window. With 'Shift+Cursor-UP' the window gets smaller, with 'Shift+Cursor-DOWN' the window gets larger.
The settings are saved as user.ini and reload with the next program start.
Right click on any of the channel images to access additional options to control the scan or change the image filtering functions.
Parameter Window¶
Z Tab¶

- Ref.
- Is the setpoint of the system. In dependence on the selected feedback mode, it has different meanings. In DNC, its the amplitude. In contact mode, its the set T-B signal.
Tip
One can change the setpoint units for certain feedback modes by clicking over the unit text displayed next to the Ref. input box. Left Click will switch through smaller units (e.g. mV → μV → nV etc.), while Shift+Left Click will switch through larger units (e.g. nV → μV → mV etc.).
- Ki
- integral part of the PI feedback (switchable)
- Kp
- proportional part of the PI feedback
The mathematics behind the feedback procedure is shortly described in Options → Feedback. - Bias
- is the dc output voltage provided at the Ut output of the DS4L controller (switchable) or the Ref B output (yellow cable) of the Lockin amplifier. An additional ac modulation can be added to the bias in the MultiLockins Window under the LIA 1 -> Kelvin FB section.
- Range
- scan range in µm
- Speed
- scan speed in lines per second. If the speed is selected higher than 10 lines per second, the on-line visualization of the acquired images might be switched off automatically.
- Pixel
- All images are taken square like with N by N pixels resolution. The number of pixels effects the scan achievable speed and the achievable resolution of the images.
- x-Center, y-Center
- in relation to the scan range, are the central coordinates of the acquired images with respect to the total provided range.
- Scan Angle
- turns the scan direction. If the scan angle is 45 degree, the maximum scan range is reduced by a factor of \(\sqrt{2}\).

- Switches behind the parameters:
-
Ki (and for versions without tip conditioning also Bias) provide a switch. When you click with the left mouse button on the text Ki or Bias, respectively, these values will jump between the current and a 2nd value. When the 2nd value is on, the background of the text gets blue.
For Bias, this allows to switch the sample voltage and one might pulse the tunnel voltage with this option.. For Ki, this switch is used to distinguish between approach setting and scan settings. During AutoApproach, it uses automatically the 2nd value.

- Automatic Approach button:

-
click once to start automatic approach.
When the right mouse button is used on the approach button, it shows two options: "one step" and "Auto Approach". The fast written one is the standard option performed when the left mouse button is used on the approach knob.
The automated approach is a loop in which:-
the piezo is retracted fast
-
the steppers move "Approach steps" forward (approach steps are defined in "Options/Misc")
-
the feedback approach the tip with the user defined speed until the front position -- 10 % is reached
This loop stops whenever a single data point is below the given setpoint value.
-

- Retract button:

- when pressed, the tip is
retracted by the option chosen. In order to view the selected option,
use the right mouse button on the retract knob. The picture left shows,
that the retract button can be used to retract the piezo only ("piezo").
This option is used for soft-retract, if any sensitive feedback
parameter or even the sample position has to be changed.
As standard, "10 µm" is selected. When the retract button is used in an approached situation, the piezo is retracted first. Then the stepper is used to retract 10 µm.
When inside the selection menu the "100 µm" is chosen, the system retract 100 µm. - z Control:

- opens window for manual Z control. See zControl Window for details.
Tip colour meaning:
| Colour | Tip position | Meaning |
|---|---|---|
| Red | Almost retracted | The tip is the last 10% of the possible positions, and cannot retract further. |
| Green | Central positions | The tip is approached and held in a central range between 10% and 90% of the possible z-values. |
| Yellow | Most extended position | The tip is extended more than 90% of its maximum possible extension. If this colour occurs during scan, it is possible that the tip does not reach the sample surface anymore. |
| Lime Green | Any | If the tip moves very fast in the time slot, its position is detected; the difference between its maximum and minimum extension in this time slot is shown in lime green. |
FastZ Tab¶
FastZ tab is functionally similar to Z Tab and is used to set the feedback parameters for the fast Z piezo. This is used whenever dual-Z is enabled in the Scanner settings.

Level Tab¶
Applies plane correction at hardware level on XY scanners during image acquisition. The main change is the levelling of the sample plane versus the scanning plane during image acquisition. This levelling is neutral to the z-output of the feedback. It consists of two coefficients dz/dx and dz/dy, which describe the tilt in x- and in y-direction, respectively. During the scan, when the scan generator provides a step in x-direction, the resulting step dz calculated from dz/dx is added to the z-output. The same is done for the y-direction.
Level is visible as extra tab in the parameter window. It has three different states:
Off disables the level function. Even if there are numbers available from the last scan, these values are not used for the tilt correction. One can click with the left mouse button into one of the coefficients and provide a number for later use.
Note
When the program is started, Off shows the last used values, but does not use them. It is useful to click into the values and set them to zero before one switches to Auto.

Fixed allows the manual adjustment of the sample plane. It is thought for fine adjustment or for the case, when a single line scan is used for the plane evaluation. One selects the direction bz clicking into the displayed value dz/dy or dz/dx. The slider allows to change the value continuously. Alternatively, the number can be printed in the edit box.
Auto reacts on "Image ready". When a picture is completed, the plane of this image is calculated based on the last (displayed) coefficients dz/dx and dz/dy. The new coefficients are displayed. The next image is taken with corrected plane. As long as Auto is ON, this procedure is repeated after each completed image.
Mask checkbox allows one to choose a specified region of the topography data that should be used for automatically calculating the image plane instead of the whole image. Enable the Mask checkbox, then choose the Mask tool from the lower panel of the Parameter Window.
When the histogram plot is made visible below the topography image (choose histogram in the right-click menu), one can select the mask region by left-click dragging over the desired height range in the histogram plot.
The masked regions should appear coloured in green. Drag with a right-click in order to delete a previously masked region. The coefficients are automatically updated based on the selected mask region. The next image scan will use these parameters to perform the level function.
For example, unprocessed raw topography image with level off (left) and after masked auto-level (right) scans are show below:

Note
The coefficients dz/dy or dz/dx are calculated in degrees. The given number presumes that the scaling in x- , y- and z-directions are correct.

Fly Tab¶
This is offers an alternative to the standard tow-path imaging (forward/backward). Fly modes are used to image the surface a 2nd time in a different height. If the flight is intended, one has to check at least one of the 3rd column check boxes in the acquire menu (Options → Acquire) with the name Fly. Then, an additional tab appears in the parameter window.

Note
In versions older than 17h, an Edit-Window appeared in the acquire menu, which allowed to set a flight height. This value has now to be set in the tab Parameter → Fly under "height".
This Tab allows to set a flight height as known from previous versions and provides three options:
Off scans over the surface as if 'Fly' is not intended. Even, if there is a number given as height, this number is not used. (Don't get irritated: the images with the name ".... Fly" do not disappear and their last data are shown during scan. But when saved, these images are empty.)
Line wise equals the former 'Fly mode'. Each scan line is taken once as topography. After backward trace, the tip is elevated the "Height" above the surface and the same topographical line (including all detected topographical variations) is scanned a second time in this height.
Negative value of Height = retract.
Now is intended for the scan of a complete plane above the surface without tracing the real topographical variations. It is important, that the surface has been leveled with the Level function properly, before this mode is used for scanning. When "Now" is selected, the tip is lifted immediately, and not released to feedback until Now is switched OFF again.
Danger
Don't forget to switch Now OFF, when the image is ready. Drift might cause a collision of the tip with the surface, because the feedback is OFF!!!

When a planar scan in a 'Height' is intended above the surface, but no complete picture should be taken in advance, we suggest the following procedure:
-
go to "line scan" by right mouse click into the scan knob. The symbol changes from
to
. This enables a function, that scan only the first line of a picture. -
Chose the scan angle 0º (In original settings, this scans the y-direction.). Open the Level-Tab and the oscilloscope window. Chose 'Fixed' in the Level-Tab.
-
Start the line scan by clicking into
. The first
y-line is scanned repeatable. -
Use the slider or the Edit window to adapt the leveling coefficient 'dz/dy', until the plane vanished.
-
Rotate the scan direction to 90º (x-direction is scanned). Adjust the leveling coefficient 'dz/dx'.
-
Go back to 2D scan mode. Use Now to lift the tip and start to scan.

Kelvin Tab¶
This tab is displayed when Kelvin Menu On is enabled in Options → Feedback.
Ki -- defines the feedback speed of the Kelvin Feedback
Ref. -- allows to use offset compensated KPFM (correction on the input signal for the kelvin Signal to get rid of cross talk induced distance dependencies.
Feedback On -- switches the feedback on (standard = off)
Sub-Functions inside the Parameter Window
¶
Drag&Drop- Enable this feature to drag and drop the current scan image into the Scripting Window
Move center- With this function, the current scan area can be
moved during the scan.
Disable this function to avoid unintended movements!

Zoom- Allows to zoom into the currently scanned image starting from the center or a corner. Choose from the available options in the right click menu. Additionally, asymmetric zoom can be chosen. After an asymmetric zoom, the parameter Image Format in Options → Misc → Aspect Ratio is changed. Asymmetric zoom will not have an effect on the pixel density setting.
Tip
-
Zoom out (to larger image sizes) by simply dragging the cursor over the image borders.
-
Return to square-like images by selecting Zoom from Corner or Zoom from Center.

Mask- Used to draw a mask over a region of the scanned image. See Level for more details.

Show grid- Display grid over the acquired image. The position, size and orientation of the grid can be customized using three handle points that appear with the grid.
Measure Lateral Distance- Measures a distance XY inside a currently acquired image

Spectroscopy- Acquire Single Point (one spectrum per click onto a position) or
Grid Spectroscopy spectra inside the currently acquired scan area.
The grid positions of grid spectra are shown inside the image. During
image acquisition, the scan stops automatically at these positions and
takes a spectrum with the current setting. For each data channel in the
spectroscopy window, a data file "... _Matrix.dat" is generated.
If the spectroscopy type X(xy) is selected, chose "Single Point Spectroscopy" and draw a line inside an image which defines start and end position of the lateral manipulation.

Drift Compensation ????????????????- During a continuous (repeated) scan with constant
scan speed, enable this button and click into an image to select a
certain feature in the image. Click a 2nd time in the next image to
define the drift vector.
The activation of the drift compensation is visible inside the sample structure as red horizontal arrow.
Click with the right mouse button onto this horizontal arrow to access further options like:
Stop Correction: disables the drift compensation
Copy Speeds: copies the drift vectors into the clipboard
Stop Drift: sets the drift vector to zero -- bot the drift compensation remains enabled
X-Drift = 1.000 µm/s and Y-Drift = 1.000 µm/s: allow to set defined drift vectors in either X or Y-direction to check the system.
Top Panel¶

Exit- Exits the SXM program.
Fast- Toggles Fast Scan mode.
Start Scan- Starts image scan.
Auto Repeat- Toggles continuous image acquisition.
Save All- Saves the current acquired scan data. Shift+Left Click toggles automatic saving of data after each scan. The location and file name for the saved data can be set in File → Set Save All Path... menu option.
Additionally, the following features can be accessed from the top panel icons or from the Window menu:
Spectroscopy Window
¶
The spectroscopy allows to acquire a wide range of spectra. As there are many different possibilities to collect data, some typical spectroscopy types (data acquisition versus tip-sample distance or data acquisition versus bias voltage) are predefined.
Side panel¶

The dropdown selector on the top allows you to switch between those predefined or a customised spectroscopy mode.
- X(z)
- the z-output is swept
- X(U)
- the bias or "Ut" is swept, while the feedback is turned off
- X(U) CL
- the bias or "Ut" is swept, while the feedback is kept active
- X(t) z-Step
- a height-step is output on the z-channel with feedback off (measures step response of the microscope in Z)
- X(t) z-Step CL
- a height-step is output on the z-channel (measures step response of the Z-feedback)
- X(t) U-Step
- step output on channel Bias with feedback off
- X(t) U-Step CL
- step output on channel Bias with feedback off
- MassSpec
- ????????????
- cmAFM X(U)
- does the X(U) spectroscopy in contact mode, when the operation is in dynamic mode (movement to position in dynamic mode, spectrum in contact mode)
- X(t) noise
- applies a statistic white noise to the outputs X, Y, or Z use to measure transfer functions
- X(xy)
- lateral spectroscopy (data acquisition during a trace over the surface)

When Acquire Spectra
is first clicked, the piezo retracts dz2 and stays in
this position. It shows the message "System is waiting". Click OK to let
the system approach again.
The left panel contains various input paramaters used to control the spectroscopy acquisition corresponding to the selected mode

- X, Y
- coordinates of the data acquisition (changed with "select")
- delay 1
- time before 1st data point in ms
- delay 2
- time between data points in ms
- dz1
- distance 1 to be retracted/approached (negative values for retract!!)
- dz2
- distance 2 to be retracted/approached (negative values for retract!!)
- U Start
- start voltage for ½ loop
- U Stop
- stop voltage for ½ loop
- Acquire
- Here, the channels to be acquired can be selected. For standard applications, choose T-B (normal force) in contact mode, and the amplitude (channel name might be LiaR or Amplitude) in dynamic mode.
Top panel
¶

- starts the spectrum acquisition. The spectrum is also taken, if you zoom into a new frequency range.

- Opens a options window, where data storage, view and acquisition options can be changed.

- If checked, the spectrum acquisition is repeat, until this knob gets released again.

- Saves the spectrum with the next valid number. The number can be reset to zero by changing the base name of the file with "Save as" or by using the ini file entry [SpectOpt] → NextNumber = 0.

- Copies the data to clipboard.


- Fits the acquired data according to the chosen fitting algorithm (see Settings → Fit). The range on the x-axis is
taken from the last spectrum.
The range of data used for the fit is adjusted by moving the endpoints of a helper-line that appears in the plot. Click on
again after changing the helper-line end points to update the fitting calculation.
Settings
¶
The settings window for the spectroscopy consists of seven tabs:

- Excite
- Selects the spectroscopy type. When a pre-defined spectroscopy is chosen (e.g. Distance spectroscopy), this window shows which variable is swept during spectroscopy.
When the customised spectroscopy is selected, the user can choose the variable to be swept, here.
Trigger feature can be used to start the spectroscopy using an external trigger signal.
The noise settings for X(t) noise mode can be set here as well.

- Cycle
- Defines the start and end points of the variable to be swept with
respect to the actual position
Lead In and Out: If "On", the sweep starts at the value set or detected at this moment
Cycle: ½ cycle measures from value 1 to value 2. The full cycle measures from value 1 to value 2 and back. N cycle repeat the full cycle N times. With "Load Ramp" a user dined ACSII ramp can be loaded (see APPENDIX 9).

- Delays
- Delay3: Time after reaching Position and 2nd parameter set
Delay4: Time after Spectrum
Dead Time: Time in between data points, that is not taken into account for averaging
Slewrate Bias: Maximum rate the output Bias is changed during spectroscopy
Slewrate Topo: Maximum rate the output Z is changed during spectroscopy
2nd set parameter: Before spectroscopy is started and the feedback is switched off, the system might set different feedback parameters

- Acquire
- DataPoints is the amount of points in a half-cycle.
max. Averages: the specified number of acquired curves are averaged when continuous acquire is enabled.
Stop on SNR automatically stop continuous acquisition of curves when the data reaches the specified signal-to-noise ratio.
Auto Repeat Cycles: (new feature from SXM v28.30) This allows one to set a specific number of curves to be acquired continuously. Enable continuous acquire
in the top panel to use this feature, it should now additionally indicate the set number of curves that will be acquired e.g.
(or
for >10 auto repeat cycles). The acquisition stops automatically after recording the specified number of curves. Each acquired curve is saved as separate files if Auto-Save is enabled
. Set cycles to either “INF” or “0” to continuously acquire infinite curves, until manually stopped by clicking 
Channel(s) defines the number of acquired channels. Which of the available signals is displayed in the channels, can be chosen in the Acquire part of the spectroscopy window side panel.

- View
- Defines the way the data are displayed on the screen.
With "draw vectors" enabled, the data points are connected with lines of the provided width. Otherwise, each data point is drawn as dot with the width as size/diameter.
x-Axis drop down selection allows to chose which data are used as x-axis.
Show Lead In and Out will display the intermediate data between the point of feedback and the point of spectroscopy start/end.
Spectroscopy Time Scheme


- Fit
- When Fit after Spectra done is enabled, the fitting algorithm is automatically applied after each spectrum is acquired.
Choose the Fit Algorithm from the available options:
Linear - applies a linear fit (e.g. to determine a system sensitivity)
Step Response - fits a step response
Find Peak - finds maxima peak value
constant - calculates average value
F(z) - Finds contact slope, mean zero force and maximum force for a general force-distance curve, where the cantilever is brought to contact and retracted from the sample. When Min is enabled, the repulsive contact force is assumed to be in the negative direction relative to the zero force.
Customize the formatting of the fitting range helper-line using the options listed under Draw

- Save
- Enables the user to set the file parameters for the ASCII export of
the data. Path and file name shown here a defined in the function File → Set
Save Path ... or with the function File → Save Spectroscopy As
...
All other settings define the extension, delimiter and structure of the ASCII file. Numbered saving is recommended for all kind of automated data acquisition and for the use of Line, multiple Point and Matrix spectroscopy.
Short Explanation of the Spectroscopy Types¶
| Type | Description |
|---|---|
| X(z) | Retracts the tip or moves the tip in z-direction, while the feedback is off. |
| X(U) | Sweeps the output voltage at Bias, feedback is OFF. |
| X(U)CL | Sweeps the output voltage at Bias, feedback is ON. |
| X(t)z-Step | Applies a step output to Z, feedback is OFF. |
| X(t)z-Step CL | Applies a step output to Z, feedback is ON. |
| X(t)U-Step | Applies a step output to Bias, feedback is OFF. |
| X(t)U-Step CL | Applies a step output to Bias, feedback is ON. |
| MassSpec | ???????? |
| cmAFM X(U) | Switches feedback mode from AmplitudeR to ContactMode after reaching position. Sweeps the output voltage at Bias in contact mode. Switches back to dynamic-mode feedback. |
| X(t) Noise | Analyses the system response of the closed-loop system in X, Y, or Z direction. |
| X(xy) | Lateral manipulation. |
Contact Mode Conduction Measurements (cmAFM X(U))¶
-
the tip moves with the scan speed to the acquisition point in the current feedback mode
-
wait "delay1"
-
the feedback is switched to Contact Mode based on the last settings in contact mode
-
wait "delay1"
-
data acquisition with "delay 2" as point delay (voltage is swept according to settings)
-
the feedback mode is switched back to the former feedback mode
When the signals "Amplitude", "Normal Force" = "T-B" and "Bias" are observed on the oscilloscope during the spectra acquisition, one finds the following picture:


When the x-y-position is reached, the amplitude drops to zero (drive is switched off, feedback mode is changed to Contact Mode) and T-B jumps to it's set-point (here: 100 mV). The system waits "delay1", until the voltage is swept (here: from 0V to -0.5V and back). After a further "delay1", the feedback mode is switched back to dynamic mode. As the amplitude is zero (from the Contact Mode), the DNC feedback retracts the tip slightly, while the cantilever starts to oscillate (this takes some ms). Typically, the system retracts before it re-approaches to the former distance in NC mode.
Lateral Manipulation (X(xy))¶

The spectroscopy type X(xy) is used to perform a lateral manipulation.
If this spectroscopy type is selected, the spectroscopy icon in the
parameter window has to be set to Single Point Spectroscopy
.

The start and the end position of the lateral manipulation is defined as follows:
-
chose the spectroscopy icon
in the parameter
window -
click with the left mouse button onto the start position
-
while mouse button is kept down, move the mouse to the end position
-
release the left mouse button at the end position.
The lateral manipulation is started immediately, when the mouse button
is released. The trace of the tip is shown in the plot area. One may also click on Acquire Spectra
on the top panel of the Spectroscopy Window to execute the lateral manipulation again.
The lateral motion speed is set in the Parameter Window's Speed setting.
Delays are defined differently in lateral manipulation:
Delay1 is the time after the start
position is reached.
Delay3 is used to define the time per data point, however, it is
interfering with the lateral motion speed. If Delay3 is chosen to be too
long, the lateral movement is finished before data acquisition. Thus,
it is better to set Delay3 to zero in order to correctly assort
acquired signal data to the position.
If the tip is not in feedback, the vertical movement speed during
lateral positioning is defined by Slewrate Topo.
For a more advanced lateral manipulation procedure, check Atom manipulation
.

Coarse Move Window
¶

- Retracts the tip from the sample by moving all three stepper motors simultaneously

- Approaches tip and sample with all three stepper motors simultaneously

- The back motor is moved upwards. The head angle towards the sample increases. As side effect, the tip retracts from the sample.

- The back motor is moved downwards.

- The left motor moves down and the right motor moves upwards. The head is tilted along its y-axis. On multi-tip chips, the left tip touches the sample first.

- The motors are switched off. Please use this button after each manual movement!


- Set the delay time for each motor axis movement during a normal click (slow motion) and a Shift+Click (fast motion) operation.
Single steps: it's not possible to move only single steps. When you
click once on the button, the motors move as long as the button is pressed.
Fast movement: Use "SHIFT" + left mouse click onto a button to move
the motors constantly.
Information on advanced configuration options for coarse movement is documented here.

Crosshairs Window
¶
- X-value (= lateral defelection), Y-value (= vertical deflection)
- positions on the photo diode shown in mV. The maximum numbers here are about 7000 mV.
- Total Intensity
- SUM signal of the light intensity of all four photo diode elements. Maximum number here is 7000 mV, too. It can be scaled in mW or µW.
Note
The displayed channel can be chosen in the ini-file under [crosshairs].
- Dot colour
- A black dot indicates a constant SUM signal. If the intensity increases, the dot gets green. A red dot means, the intensity decreases.
- Laser

- switches the laser power on and off.

- Options

- This icon toggles the display of the options sidepanel.
Show Values enables the visualization of the numbers for TB, LR or Sum.
Gain switches the magnification of the data visualization (NOT the hardware input gain, this is switched in the DNC window).
Dynamic Non-Contact Window
¶
The frequency response of the cantilever can be tuned using the DNC window.
Basic operation¶
-
Click on
to display the various settings
tabs. In the Acquire tab, set the range of frequency sweep
(under max. Frequency Range) and number of Datapoints to
acquire. -
Set an appropriate drive excitation voltage on the left side-panel (under Output A) and gain value (under Input A gain) .
-
Click on
to perform the frequency scan. Click and drag using the left mouse button within the plot to zoom-in to a
range of frequency. You can zoom-out by right-clicking on the plot
and choosing an older frequency range. Click on
to continuously perform scans and average
them for a smoother result. -
After obtaining a good frequency response curve, click on any point on the curve to set the desired drive frequency and setpoint. This is indicated by a vertical dashed line and a red plus symbol.
-
Thermal noise spectra can be similarly obtained by clicking on
. Make sure the frequency range was
sufficiently zoomed in around the resonance peak before performing
this operation.
Side panel¶

- Input gain:
- This is a hardware switch for the input amplification on the PCI lockin amplifier. It affects the available range for the Input A signal (e.g. T-B):
Gain signal range
gain 1 : - 7 V ... 7 V
gain 10 : - 700 mV ... 700 mV
gain 100 : - 70 mV ... 70 mV
- Output A:
- Sets the first output channel signal setting, i.e. excitation frequency and excitation amplitude (reference for lock-in LIA0). This output signal is sent to the red cable of the lock-in card output.

Plot area¶
- Zoom in:
- Click with the left mouse button drag to the right inside the plot area in order to set a smaller frequency range. A blue box appears showing the range during click and drag.
When the mouse button is released, a spectrum in the new range is acquired automatically. Right click inside the plot area to chose one of the last three or maximum frequency range. - Frequency and setpoint selection:
- Click once with the left mouse button within the plot area. The lateral mouse position is used as the excitation frequency (Output A) and the vertical mouse position is used as the new setpoint (in Parameter window), indicated by the dashed vertical line and the red plus symbol in the plot, respectively.

Top panel¶
Autotune- Automatically finds the cantilever resonance frequency. This feature can be enabled and configured in the Settings sidepanel → Auto tab.
Acquire spectra- Starts the spectrum acquisition. The spectrum is also taken, if you zoom into a new frequency range.
Auto repeat- Inside the spectrum, a vertical grey line appears
which visualizes the chosen position and a red cross on this line shows
the selected setpoint for the feedback. If the user changes the setpoint
now manually, this cross moves along the line to the new position.
Use the right mouse button to display former frequency selections and a default range over the full spectrum.
Repeated spectrum acquisition. When the Auto Repeat feature is enabled, all spectra are integrated. Otherwise, this feature allows to use the spectrum acquisition as spectrum analyser.
Bandwidth switch- Toggles the bandwidth setting for the lockin
amplifier input (LIA0, Input A) which allows you to select the lock-in time constant and roll-off parameters for the low-pass filter. The time constant setting appears in the left side-panel as Filter Time when Low Bandwidth
is selected,
while the roll-off setting can be accessed inside the Ports tab of the Settings side panel.
For standard dynamic contact mode with resonance frequencies above 20 kHz, this feature should be set to High Bandwidth
. For cases when the cantilever resonance is below 20 kHz or when the DNC window is used for either noise measurement or force modulation technique in contact mode at lower frequencies (e.g. 3 kHz), then use the Low Bandwidth setting and choose an appropriate time constant and roll-off. Please note that these time constants are independent of the time constants of the multi-lockin for EFM and KPFM applications.
Thermal Noise Spectra- Acquires the thermal noise spectra of the cantilevers which can be used
to determine the force constant based on the Sader method.
When
the feature is enabled
, the excitation of the cantilever is switched
off automatically. The displayed data are a Fourier
transform of the input signal acquired vs. time. The best result is
obtained, if many of these Fourier transforms are integrated. The
integration is enabled with the Auto Repeat
feature which automatically repeats spectrum acquisition and averages
them.
Save- Save the acquired spectra data in a text file. When the icon is red
, the destination folder needs to be set in Settings sidepanel → Save tab.
Perform Shift+Click to toggle continuous saving which is indicated by the yellow icon:
Perform Ctrl+Click to Save as.. a different file.
Copy to clipboard- Copies the acquired spectra data to clipboard, which can be directly pasted into a spreadsheet or text editor program.
Settings- Toggle the display of settings sidepanel, where acquisition, data storage and view options can be changed.
Settings¶
The settings side panel consists of seven tabs to configure the dynamic mode.

- Ports:
- Input AC is an optional feature available in
select AMU cards and can be enabled from SXM version 28.26 onwards. This
feature is made visible by including enableAC=1 under [dncopt] in
the ini file. When Input AC is enabled, the lockin amplifier input
is ac-coupled through a digital switch.

Sync Filter is a special feature available from PROM-Code version 26h in the AMU2.6 cards as well as on the AMU2.9 card. The feature enables a faster evaluation of the amplitude signal related to the operations frequency. The amplitude is taken after 1/f, already. This feature increases feedback speed. For cantilevers with high resonances, the noise is however increased. The reaction time of the feedback system reduces from 100 µs down to 50 µs. Use the Sync. Filter checkbox to enable/disable this mode. The number of oscillation cycles to be considered for amplitude measurement can be set using No. of Periods.
Note
Larger numbers of oscillation cycles are useful for cantilevers with larger Q-factor and higher resonance frequency. Estimate a good value for the no. of periods is
-
to measure the Q-factor Q (e.g. 300) and centre frequency f (e.g. 300 kHz) in DNC window
-
take Q/10 as amount of periods S (e.g. 30)
-
check that S/f (e.g. 30/300 kHz = 0.1 ms) is much shorter than 100 µs -- otherwise reduce the amount of periods.

- Acquire:
- Phase sets the phase between the outgoing
excitation (red cable → Dither) and measurement signal (blue cable → Input A/T-B).
Auto Phase will automatically set the phase offset to zero when the working frequency is selected in the DNC window.
Harmonic ???????????
Average allows you to average over the specified number of acquired values at each scan frequency during the sweep. This is a way to filter out the noise without changing the time constant, which can be useful in the high bandwidth setting, since the SPM lockin always has a 25 µs time constant in that case.
Averaging offers another possibility to improve the signal to noise ratio by averaging subsequently acquired spectra curves. Auto repeat spectra
must be enabled to use this feature, then the spectra are acquired continuously and all the curves are averaged automatically.
Wobble performs an additional small frequency sweep in the neighbourhood of each scan frequency and averages over them. In this way, the response of every excitation frequency is more precisely captured during acquisition. This is especially useful to find small peaks present in the spectra.
DataPoints sets the number of points or steps in which the frequency is swept when the spectra is acquired.
max. Frequency Range is the maximum possible frequency range to be swept over. This range can be always accessed in the right click menu inside the plot area.
Dual Resonance feature allows the possibility to tune the cantilever at its two different harmonics. Enabling this will add a second plot of frequency spectra below the existing one in the plot area. Use the the mouse to zoom-in to an appropriate frequency range at around the desired harmonic and acquire spectra.
Note
The excitation parameters are chosen based on where you click on the lower plot, NOT the upper plot. Adjust the frequency ranges accordingly so that the cantilever resonance that is to be used for feedback is in the lower plot. In this way, a frequency other than the 1st harmonic can be used as a feedback input.
???????????

If the vertical adjustment position on the photo
detector is more than 30..50 mV away from zero, it is useful to switch
to ac coupling in the oscilloscope window. AC coupling works for all
frequencies above 1 Hz, which means for all cantilevers. This ac
coupling is available when the hardware version of the AMU2.x board is
higher than 2.3 or equals "2.3". For the version 2.3, one needs to set
the ac coupling option manually in the sxm.ini. The AMU2.9 card does
not support AC coupling.

- View:
- History Depth allows one to display the current and the specified number of previous spectra in the same plot. When set to zero, only the current spectrum is shown. When set to "1", the current plus the last spectrum are shown.
Draw Lines will display the acquired spectra data as a line plot. If disabled, the data is drawn as a scatter plot.
Show Warning on Mismatched Setting detects the hardware signal overflow. When enabled, the field around the Input A Gain in the left sidepanel gets red indicating overflow. Overflow can happen when one sets the input gain of the lockin too high, leading to signal saturation. Reduce the gain to avoid this.
Show Phase enables the display of the phase signal during spectrum acquisition.
Sensitivity allows you to scale the values to nanometers. Enter the calibration factor (in V/nm) in this field.
By default, the y-axis of the spectrum is scaled automatically to the last acquired spectrum.

- Q:
- Q-control feature can be configured in this tab.
Change Q is used to enable/disable Q-control.
Gain defines the amplification of the input signal, which is added onto the reference output.
Delay is related to the actively chosen working frequency and given in degrees (0...360°). Set this value by clicking within the circular plot. This changes the position of the red radial line corresponding to the phase delay angle, which would in-turn adjust the resulting Q value.
Spectrum at Change forces the system to acquire a new frequency sweep with the last settings as soon as Gain or Delay are changed and thus makes the effect of these parameters visible instantly.
The accepted output range can be adjusted by choosing an appropriate gain value under Ouput A located in the left sidepanel. Adjust this appropriately to avoid output signal clipping, indicated by the red
What does Q control do?

Q-control is used to adjust the Q-factor of
the cantilever's frequency response. This is achieved by feeding back
the detected output oscillation signal back into the excitation signal
after amplification (adjusted by Gain) and a specific phase shift
(set by the Delay). Higher Gain would give higher Q values.
Make sure the output does not clip at higher gains, indicated by a red

In order to find an appropriate phase Delay value, click
Acquire Curve
button, located to the left
of the circular plot (NOT the one on the top panel). A number of green points
are then shown plotted in the circular plot. The
further the point is away from the centre, the higher is the response
amplitude, i.e., higher will the resulting Q. Using these green points
as a reference, one can thus set the phase Delay value
appropriately in order to obtain a high or low Q value. See below image
showing three such example cases showing different Q values.


- Fit:
- Fit SHO always fits a simple harmonic oscillator into
the acquired spectrum. From the fit data, the central frequency and the
Q-factor are derived, so that a time constant for the cantilever can be
calculated. Based on this time constant one can estimate the maximum
pixel clock that this cantilever be operated with.
Width and Color can be used to format the fitted line in the plot.

- Auto:
- Configure the Autotune function of the cantilever in dynamic
mode here.
Enable AutoTune to enable the Autotune button
in the top panel.
Start Frequency and Stop Frequency sets the initial frequency range used to find the cantilever resonance.
iter. until Range entry is used to determine the final frequency range near the cantilever's resonance during autotune. When Autotune is run, the sweep range is iteratively reduced around the cantilever's resonance step by step and the peak frequency (fPeak) and Q-factor (Q) are determined. This continues until the final range given by the set value times fPeak/Q is reached.
Opt.Frequency is used to automatically set the final excitation frequency for dynamic mode operation, calculated as fPeak minus set value times fPeak/Q. This value is updated in the left sidepanel under Output A.
2nd Range is used to set the initial frequency range to find the cantilever's second harmonic, used when Dual resonance is enabled in the Acquire tab. This range is taken to be the set value times the 1st Range. Use this to automatically tune at two different harmonics. A priori knowledge of the approximate expected resonance frequencies at each harmonic can be useful to set reasonable initial frequency ranges.

- Save:
- The Save tab gives access to data storage
settings.
File name shows the complete path and file name for the saved file. Click on
to open a dialog box to choose an appropriate path.
Extension can be used to set any desired file extension for the saved data file. Don't include "." here, it is automatically added to the final file name.
Save numbered, when enabled, will save the current file including a four digit counter number appended to the file name at the end. Every subsequent save will increment the counter number while keeping the same remaining file name. The counter number for the next file is displayed here as next nr..
Comment each file can be enabled to include a comment in the file, as provided by the text box below.
X-axis and Phase data are stored in the file when enabled here.
Delimiter sets the delimiter character between the data columns in the file.
Oscilloscope Window
¶


The oscilloscope works like a real 3-channel oscilloscope. The real-time channel traces are plotted in three colours. Click and drag on the channel handles to adjust the vertical position of the trace within the plot area.

- Channel selection:
- Use the drop down list to select the channels to be displayed. AC coupling for the displayed data can be toggled using the ac checkbox.
Note
If any particular channel is not listed, you will need to enable it in the Main Window's Options menu → Scale → DAC tab. Double click on the desired channel's Use entry to set it to yes. Close and reopen the Oscilloscope window, the channel should now be available in the drop down list.

- Channel scaling:
-
y-axis scaling per division of the displayed channel trace is shown right under the channel dropdown. One can choose three ways to set the scaling:
-
auto: automatically scaled based on current values
-
fixed: double click on the scaling value to set a fixed scaling
-
max: the scaling is set to maximum value of the channel
-

- Channel reading:
- Below the y-scaling, two additional numbers display the channel data readout. Right click over them to change the nature of readout value to any of the available options: Mean, RMS, acRMS, Latest, Min, Max. These values are calculated and updated for the current displayed range of trace data visible in the plot area.
Note
If the time scaling per division is long, you may have to wait until the displayed traces have stabilized in the oscilloscope in order to the get the correct mean or RMS values.

- x axis:
- The traces can be plotted w.r.t. either time or frequency (FFT).
Adjust the x axis scaling per division value here.
Run/Stop:- Start or stop oscilloscope data acquisition

Save all:- Save all channel trace data as text or as an image snapshot of the plot. A dialog box pops up which gives you the option to save as either a text file or as an image under the Save as type dropdown list. Check Settings → Save tab for more options.
Copy to Clipboard:- Copy either the data as text or as an image snapshot of the displayed plot. Check Settings → Copy tab to configure this behaviour.
![]()
Settings¶
Click on the settings button to configure various oscilloscope features. The settings window consists of four tabs.

- Save:
- Configure how the data is saved when
is clicked. The available options are similar to those described before.

- Copy:
- Configure how the data is copied to the clipboard when
is clicked. One can copy an image snapshot by choosing either Graph as bmp or Full form as bmp, which will copy either the graph or the full oscilloscope window, respectively. Selecting Data as text will allow you to copy the underlying trace data as text, which can be pasted into a spreadsheet file.

- Acquire:
- Stop after full frame will automatically stop the oscilloscope data acquisition immediately after a new set of data has been acquired within the displayed plot area.
Long term data feature allows data acquisition of a larger number of points, even beyond what is visible in the displayed plot area. Set the desired number of Datapoints to be acquired in the entry box below. When this feature is enabled, clicking on
will include an additional data format Long Term Data-File available in the Save as type dropdown of the dialog box. Make sure to choose Long Term Data-File in order to save the full long term data. Note that if you choose Text-File, only the currently displayed data visible in the plot area is saved, not the entire long term data!

- View:
- Draw lines allow you show the displayed as a line plot or as a scatter plot.
Ch1(Ch2) will plot the 1st channel in x-axis and the 2nd channel in y-axis. Choose the channel selection dropdowns to assign the desired channel to each axis. Click and drag the channel handles 1-> and 2-> to adjust the relative horizontal and vertical positions, respectively, of the displayed data. This feature can be useful to plot real-time Phasor diagrams or Lissajous figures, for example.
Scripting Window
¶
The Scripting Window offers several features:
-
Perform spectroscopy measurements in a single point or a series of line or grid points.
-
Run custom user-defined scripts.
-
Zoom and set the desired image scan area.
-
Move the tip position (X, Y and Z scanners) using a joystick.

Select window¶
The main Select window is displayed as shown above. The left panel shows an entry "Max.ScanRange" (maximum scan range). On the right side, the dark grey region represents the total available scan area and the light grey region shows the current scan area as per the Parameter Window settings. The current tip position is displayed as a red dot. The blue line indicated from which side the image scan will begin.

Click in any data channel window and drag and drop the image into the
scan area of the Select Window. You will need to first click on
in the Parameter Window to be able to drag and drop an image. Then, the image is copied into the scan area. On the left side below the entry "Max.ScanRange", an additional entry appears in the list showing the dragged channel name and its scan range size. One can similarly drag more images which will be added into this list.
Observe and move the tip position¶
If the entry "Max.ScanRange", "CurrPosition" or one of its sub-entries is activated (selected), the red spot shows the current tip position inside the total scan area during the scan or any kind of spectroscopy.
Open the entry "Curr.Position" with a click on "+" to display the numbers corresponding to each sub-entry X, Y and Z (example: "X-3.021"). These numbers are the values of the current tip position in the selected physical units (here: µm). They are updated during each scanner movement.
It is possible to move the tip (scanner) with a joystick. The joystick needs to be configured first and the Feedback Mode must be Off. Activate the entry "CurrPosition" and move the joystick handles to move the tip position. The X, Y and Z values and the red dot position are updated live. It is possible to limit the scanner movement to one of the three directions, only. Select for instance "X| value" to limit the movement only in the x-direction.
Single point¶
Click on the icon
. A
sub-entry "Point" appears below the image entry in the left panel. It contains further sub-entries showing the point's X, Y and Z coordinates.
When one clicks on
for the first time, the current tip position is used to generate the X, Y, and Z coordinates for this point. Left click anywhere inside the scan area or the dragged image to choose a new position for the point. A blue cross
appears indicating its position.

Right click on "Point" to access the following additional functions.
- Go in X and Y:
- The tip moves to this point's position with the currently selected scan speed.
It is also possible to move the tip in x-direction or y-direction separately. Right click on any of the coordinate sub-entry (example: X|-3.021) and choose "Go in X" and the tip should move only in x-direction. - StartSpec:
- The tip moves to this point's position first and a spectroscopy curve is acquired. It uses the currently set parameters in the Spectroscopy Window. The X and Y coordinates are automatically updated in that window to match the selected point.

Line Spect¶
Allows you to acquire spectra on a line of points inside an image that was drag&dropped into the Scripting window earlier.
A sub-entry "Line|10" appears below the image entry in the left panel. Here, 10 indicates the number of points in the line. One can change it by clicking onto Line sub-entry in the left panel. A small edit window pops up that
allows you to change the number of data points to be taken along this line.
In order to move the position of the line, one simply draws a new line,
by clicking with the left mouse button onto the start position,
drag it and finally release the click at the end position.
Right click on the Line sub-entry to access the function StartSpec. This will acquire a spectroscopy curve at each point of the line in sequence. It uses the currently set parameters in the Spectroscopy Window.

Grid Spect¶
Allows you to acquire spectra over a grid of points on the current imaging area. The locations of the points are equally distributed over the whole image.
A sub-entry "Matrix|4x4" appears below the image entry in the left panel. Here 4x4 indicates the grid dimensions as number of points in x and y directions. One can change this by clicking on the Matrix sub-entry in the left panel. A small edit window pops up that allows you to change the number grid points.
In order to start spectroscopy acquisition on the created grid points, right click onto the Matrix sub-entry and select the StartSpec. It uses the currently set parameters in the Spectroscopy Window.

Zoom¶
Click with the left mouse to define the centre of the zoom area and keep the mouse button down while you drag to define the size of the new window. When the mouse button is released, a green square shows the selected new area. A "Zoom" sub-entry is created under the image entry in the left side-panel, showing the zoom factor (here: 298 %) and the new scan range size (here: 6.791 µm). The Parameter Window entries are automatically updated corresponding to the newly created zoomed region.
After a zoom into an image and a new scan, one can go back to the old scan range selection. Right click on any of the drag and dropped image entry in the left side-panel and choose "Use Parameter". This will reset the values of Range, x-Center and y-Center in the Parameter Window to its original state before any zoom operation.

Run user-defined scripts¶
The Scripting window allows you to run user-defined scripts. A script is loaded
by clicking on the button
. The program automatically loads the last used
script. In the left side-panel below the selected image, a new sub-entry
"Script" appears with name of the script file (e.g. pulse.scr).
Double click onto the script file name, an editor window opens the script file, which you may edit and save. If there are positions defined in the script (using the "GoXY" command), they are displayed in the image as points.
is used to open a new script file located in your PC.
executes the currently selected script. The horizontal bar shows the progress of the script execution.
The white screen displays messages during the script execution. For
available commands, please refer to the script language description manual. Several example scripts are available in the SXM installation directory: "..\Anfatec\bin\Scripts".
DAC Outputs Window
¶

Here, you can change the output voltage of the auxiliary DAC output channels 5-8. The number shows the currently set value in Volts. When amplification "1" is selected, the slider moves from -10 V to + 10 V. The accessible voltage range around the current value can be made smaller by choosing a higher amplification factor "10" or "100". When the amplification factor is changed, the slider is always in the central position. Drag it towards either direction to set the voltage more precisely in the neighbourhood of the current value. Alternatively, one can also directly set the desired output voltage value by simply typing them into the corresponding input box.
Multiple Lockins Window
¶
If a 2nd (or more) Lock-in card is installed, the Multi Lockin window is used to configure and operate these additional Lock-in amplifiers.


Basic operation¶
The window supports at most three additional Lock-in cards. The relevant options for each card are displayed on the top in three separate sections: LIA 1 -> Kelvin FB, LIA 2 and LIA 3. The reference frequency and phase settings for each Lock-in card can be independently set in the corresponding input boxes within each section. The time constant and roll-off settings for bandwidth adjustment are set common for all three Lock-in cards, available at the top left.
The Lock-in amplifiers can be operated in two modes:

- Numbers
- Displays the real-time Lock-in output readings. Under the two meters, one can use the drop down menu to choose any of the available channels for the corresponding display readout (e.g. Lia1X, Lia1Y, Lia1R etc.).

- Spectrum
- A plot area is displayed to perform frequency sweeps over the input signal. This is useful to obtain the transfer function or noise measurements of the input channel, for example.
It is important to activate the desired Lock-in card from the available three options in order to perform spectrum acquisition.
This is done by clicking inside any of the three Lock-in sections on the top. The section will be highlighted in blue indicating that it's activated.
Input channel of the Lock-in can be switched between In A and In B by clicking over the text "In A" or "In B" here.
Set the frequency range to be swept from and to, and press run
to acquire the spectrum. Alternatively, one can
hold the left-click and drag within the plot region to set the frequency
range.
The Acquire section on the left allows you to choose the channels recorded during spectrum acquisition. You can change the number of possible channels to be acquired in the Settings → Acquire tab. Use the
button to toggle the display of the acquired data in the adjacent plot area.

One can link the reference frequency of any of the three available Lock-in amplifiers by using the link feature. By default, it shows "no link". You can type f0, f1, f2 or f3 in this field to link that particular Lock-in's reference to LIA0, LIA1, LIA2 or LIA3's reference respectively. The reference frequency field below will then appear greyed out and its value is updated to the linked Lock-in's reference frequency. For example, to link the reference frequency of LIA2 with LIA1's reference, enter f1 in LIA2's link field. If LIA1 is activated and a spectrum acquisition is run, then a frequency sweep will be simultaneously performed on both LIA1 and LIA2.

Input/Output channels¶
The Multi Lockin window can also be used to configure the 2nd output channel (Output B), which can be useful to perform Kelvin/Electrostatic modes. This is done in the Lock-in section "LIA 1 -> Kelvin FB". The amplitude and frequency values for Output B are set here.
Warning
Take care to set the amplitude in this window to zero if Kelvin probe or EFM is not used in order to avoid Output B voltage being sent out.


Output Channel section can be used to choose to which Lock-in output should the Output B signal be sent to (Ref A = red cable, Ref B = yellow cable). Setting it to Ref A (bimodal) will send the sum of the two output signals (Output A + Output B) into the single Ref A output (red cable), which can used for bimodal excitation, for example. Here, Output A amplitude and frequency is set in the DNC window while Output B amplitude and frequency is set under "LIA 1 -> Kelvin FB". On the other hand, choose Ref B (Kelvin) to send the second output signal separately to the Lock-in's Ref B output (yellow cable), which is typically used in Kelvin mode, for example.
In some controllers, Output B is available as a separate port labelled Bias for example.
Info
A dc offset can be added to the Ref B output in the Parameter Window using the Bias entry.

The Input gain InB section gives the hardware gain selector options for the second input channel InB (green cable), similar to how the gains for the first input channel InA (blue cable) are set in the DNC window.
Tip
One can change the units by using either Left Click or Shift + Left Click over any of the displayed unit text to switch through smaller or larger units, respectively.
Settings
¶

- Ports:
- Input AC is an optional feature available in select AMU cards and can be enabled from SXM version 28.26 onwards. This feature is made visible by including PortsVis=1 under [MultiLockinOpt] section in the ini file. Each of the lockin amplifier inputs can be ac-coupled independently by selecting the corresponding Input AC checkbox (see schematic below).


- Acquire:
- Average sets the number of points to be averaged for each
acquisition data point.
Averaging will average every acquired curve when continue acquire
is enabled.
Datapoints defines the number of acquired data points per curve.
Channels set the number of acquired data channels. Each individual channel can be then selected as needed in the main Multi-Channel LockIn Window.
Max. frequency range sets the maximum range of frequency sweep. This range can be conveniently accessed from the context menu by right-clicking within the plot area.

- View:
- y-axis log will plot the acquired spectrum with log scale in y axis.
- Save:
- Setting to save acquired spectrum data as needed (similar to previous description for DNC window)
Use
button to save using the specified file settings or use
to choose a different filename or location.

Tip Conditioning Window
¶
Tip Conditioning is done with defined vertical movements of the tip versus sample and the application of dc voltage between tip and sample.
This window offers four different (self-explaining) regimes for independent or simultaneous movement and bias.
- Bias
- defines the maximum applied DC voltage.
- Time
- defines the duration of the whole tip conditioning procedure.
- Topo
- defines the distance the tip is retracted/approached.
- Do
- Starts the tip conditioning with the chosen settings.

zControl Window
¶
zControl gives access to a manually controlled vertical movement of the tip.
- Feedback Off
- when enabled, the tip is frozen at a vertical position which is the current vertical position + dz value.
- dz
- is used to specify the vertical distance by which the Z scanner piezo must be retracted. Click inside the input box and set a value to vertically retract by the specified value.
- Slew Rate
- specifies the vertical speed at which each Z motion is performed whenever the dz value is changed.
- dz per Mouse Tick
- defines the step distance motion for each mouse wheel tick. Here, the mouse wheel is used as an alternative way to manually perform vertical step movements in Z. Click inside the dz input box and scroll the mouse wheel in order to perform the step motion.
Note
- Mouse wheels can behave different from mouse to mouse. The ini file entry:
[ZControl] → MouseWheelSense=0,00416666666666667
defines how one tick of the mouse wheel is understood by Windows. Use multiples of the given number to adapt your system to your mouse. - All movements are performed w.r.t. the initial Z position when feedback was on. Only retract motion is possible, it is not possible to approach the sample closer than the initial position????????

Vertical Manipulation Window
¶
This window is used to "program" customized sequences of vertical manipulation and acquire channel data during the program sequence. This gives more flexibility to perform specialized measurements beyond the simple approach-retract spectra that is otherwise typically acquired using the Spectroscopy Window.
Programming¶
The general idea is to program a sequence of time intervals. Each time interval is configured in separate slots displayed at the top with titles: Time 1, Time 2, etc. The manipulation sequence is performed from the left to the right time slot in series.
Insert a new time slot by clicking inside any of the existing slot area and press "Ins" key on the keyboard. The new time slot is inserted to the left of the initially clicked slot.
Delete an existing time slot by clicking inside the slot area and press "Del" key on the keyboard.
T sets the time interval for the slot.
Each time slot can manipulate up to three channels simultaneously: Topo, bias and AUX6. Available options for manipulation are:
Const.: Sets the channel to a constant value, as specified in the input box below
Ramp to: Performs a linear ramp until the value specified in the input box below
FB On (only for Topo): Vertical position is set according to the feedback settings in the Parameter Window
Mod (only for bias): A modulation amplitude can be set in the additional input box below. The upper box sets the bias dc value. The bias modulation frequency is set in the MultiLockins Window under the LIA 1 -> Kelvin FB section.
The graph under the time slots show what has been programmed with the time slot
entries w.r.t. time on the x axis. Click on the corresponding channel symbol
inside the time slot to change the displayed y axis.
The programmed manipulation sequence can be saved using
button in the window's the top panel.
Acquisition¶
The channels to be acquired can be set using the available dropdowns at the bottom of the window. Up to six data channels can be selected. Enlarge the window to make more channel acquisition options visible:

The lower graph displays the acquired data vs time for all selected channels.
Click on
in the window's top panel to run the spectra acquisition for the configured manipulation sequence.
Top Panel¶
Exit Window- Exits the Vertical Manipulation window
Open Experiment- Opens an existing manipulation sequence file
Save Experiment- Saves the currently configured manipulation sequence as a file for later use
Acquire Spectra- Runs the manipulation sequence, starting from the left to the right time slot and acquires the selected channel data
Continues Acquire- Continuously repeats the manipulation sequence
Save Data- Saves the acquired data as a text file
Copy to Clipboard- Copies acquired data to clipboard, which can be pasted into a spreadsheet program
Atom Manipulation Window
¶

Atom manipulation window is used generally in STM mode. It allows the user to precisely push or pull single atoms laterally across a substrate (horizontal manipulation) to construct nanostructures atom-by-atom. To use this feature, acquire a topography image first, then choose the Lateral Manipulation tool in the bottom panel of the Parameter window, then left-click drag over the acquired image to set the lateral motion path. The atom manipulation window opens automatically if it wasn't already open. Set the relevant parameters and click on Acquire Spectra
to initiate the atom manipulation routine.
Speed: sets the lateral speed of the tip motion
Points: sets the number of data points acquired during the lateral motion
Delay: sets the wait time between individual steps of the lateral motion.
Pre, Worker, Back and Verify are the four possible routines which can be enabled for the atom manipulation procedure. Pre executes a pause after reaching the start coordinate but before lateral movement, allowing thermal equilibrium. Worker selects the internal software sub-routine or hardware macro that manages the real-time execution loop. Back dictates tip behaviour after completion (e.g., whether to trace the path backward or remain at the destination). Verify triggers an immediate, automated local scan or spectroscopy reading to confirm if the move succeeded. Choose the channels to be acquired during a particular routine using drop-down menus available below the plot area. The acquired channel data is plotted in the displayed area for each step.
Feedback order can be set as either bias before z, z before bias and keep bias.
Bias: sets the bias value between tip and sample during the atom manipulation.
Slew rate: sets the maximum speed at which the bias voltage transitions from initial imaging bias to atom manipulation bias set above
Feedback on: can be used to toggle the z feedback on or off during atom manipulation. The corresponding feedback parameters Setpoint, Ki and Kp are available below.
dz: can be used to set an offset to the z piezo during lateral motion and slew rate sets the speed of transition to this offset value.

Camera Window
¶
Starting from SXM-software version 18u, the camera application is connected to the SXM, it opens and closes together with the sxm software.
The camera usually is adjusted in a way, that it looks directly onto the cantilever.
Right click inside the camera window to access the camera settings menu:

Source: allows to change the camera format.
Format: allows to change the size of the appearance on the screen
LEDs: opens a small window, which allows to
adjust the brightness of the two LEDs independently. The highest position makes them as bight as possible. The lowest position of the sliders darkens the LEDs as much as possible. Note that the LEDs are not completely OFF in the lowest position.

Warning
Do not keep the LED light in bright position for a long time if its not required for your application! The LEDs consume up to 50 mA and, thus, heats up the inner part of the AFM head!
Camera Off during Scan is a safety feature for the user. The camera might consume a lot of the PCs processing power and reduce the performance during image acquisition. It is safer to switch the camera off during image acquisition. This option automatically switches off the camera when the scan is started.

Options Menu¶
Several configuration settings can be accessed from the Options menu, accessed from the top menu bar of the Main Window:
- Make me User/Admin
- allows one to switch between Administrator mode or User mode.
- Acquire
- Choose which channels and directions (forward/backward/fly) are to be acquired and saved.
- Scale
- Choose which channels should be active (i.e. made available for acquisition) and view additional details such as physical scaling factors.
- Feedback
- Selects the feedback mode.
- AutoOffset
- Corrects the Offset of the feedback related input channel.
- Misc
- Miscellaneous settings related to scan, image saving coarse motion etc.
- [DDE Server]
- Program allows/forbids exchange of data with other applications
- Joystick
- Configure and test a connected joystick/game controller for manual stage motion.
- LEDs
- Change the brightness of available LED controls (I2C or PWR)
- HighSpeedSettings
- check hardware registers used in high-speed mode.
- Scanner
- Advanced configuration of the scanner, e.g. select a scanner ini-file, change scaling, etc.
- [Edit Ini]
- Opens the active SXM ini file in an editor window.
- Scale AD/DA
- Gives access to digital channels and allows to change scaling settings of the system (used for installation only)
- [Color Palette]
- Choose the color palette used to display the acquired images.
- [Touch Screen]
- If active, icons are displayed larger.
- [Measure all]
- ????????
Some additional setup procedures based on direct changes in the sxm.ini file are found here.
Make me User/Admin¶
Admin-mode: The Options menu display all possible configuration settings. All parameters can be set without restrictions.
User-Mode: Only shows a few configuration settings in the Options menu, and thus limits access to scaling entries and other advanced settings (safer).
A password is required to switch from User to Admin. This password is stored in the user.ini file located in SXM installation directory "..\Anfatec\bin\ini" under the following entry:
[Admin]
CurrentMode=0
WordPass=CETAFNA
CurrentMode=0 equals User mode.
CurrentMode=1 equals Admin mode.
The password is spelled right to left.

Acquire¶
The Acquire window is displayed where you can setup the channels to be acquired during an image scan. This menu only displays the channels that are enabled active in the Scale Window (i.e. "Use" entry set to "Yes").
Each channel provides three selections. If you select a channel under the 1st column ("->"), the data of this channel is acquired in forward scan direction. The 2nd column ("<-") allows to acquire images in backward scan direction. If one channel is selected in the 3rd column ("Fly"), each line is scanned twice: once as usual with the feedback on and a second time at a certain height (see Fly mode for more details).
In the example shown here, the Topography is acquired in forward and backward directions. Two identical pictures are expected. The Amplitude is acquired in backward direction only, while the Phase is taken in forward direction. In addition, Amplitude and Phase are acquired in Fly mode. All together, you obtain six pictures.
The symbol
beside each entry indicates which channels are available for acquisition in Fast Scan mode. Additional channels can be enabled for Fast Scan acquisition in the Scale Window.
Scale¶

Scale window is used to select which channels are active and available for image acquisition by SXM. Additionally it shows several details related to each channel (e.g. DAC id, Port number, units etc.) and also shows the scaling relations between the internal DAC/ADC units of the digital SPM controller and physical units of interest for the user. The channels are displayed as a table in three separate tabs: DAC (output channels), ADC (input channels) and Math (calculated channels). The displayed table columns are:
- Use:
- When enabled yes, the corresponding channel is made available for data acquisition and listed in the Acquire Window. Double click within the cell to toggle between yes (enable) and no (disable).
- Fast:
- (only for ADC channels) When enabled yes, the channel is made available for Fast Scan acquisition. Double click within the cell to toggle between yes (enable) and no (disable).
- Port:
- (only for ADC channels) Shows the internal port id for the channel.
- Name
- Channel name displayed in the head line of the image sub-windows and used for file names.
- Unit:
- Physical unit displayed for the channel.
- Scale:
- Scaling factor between numerical integer bit units and physical units. This factor can be negative or positive. If the topographical image, for instance, appears inverted, one can place a negative scaling factor in order to invert its visualization in SXM and Present software.
- Min/Max:
- Minimum or maximum numerical bit values used in the background of the SXM software. For 16-bit signed integer variables, these values are ±32000. For the 32-bit integer variables, ±1e9 is chosen. Set one of them to "0" to limit the output of the channels to -10 V ... 0 V or 0 V ... 10 V. Even an arbitrary output range such as -2 V ... 10 V can be achieved by appropriately setting the Min and Max bit integer values (e.g. used for PI HV amplifiers).
- Offset:
- An offset correction can be applied to the final channel value here.
- Inverse:
- If enabled yes, the channel is inverted at the interface between hardware and software. Especially for Z, it can be useful to enable the Inverse option. This allows one to define the operation direction of the piezo actuator in z-direction or to invert the output of DACs channels such as Bias, for example. Double click within the cell to toggle between yes (inverted) and no (not inverted).
- Math:
- (only for Math channels) Shows the math equation used to calculate the channel data.
Sign of Inverse vs. Sign of Scale
The Inverse sign inverts the sign of the physical output (from GUI to hardware). The Scale sign inverts the sign of the displayed signals (returned signals from hardware to GUI) in the software oscilloscope, the images and the spectroscopy data. If there is no inverting hardware circuit involved (e.g. inverting HV amplifier), the physical output sign equals the display sign when both (Scale and Inverse sign) are similar (both negative or both positive). If the sign of "Scale" differs from the sign of Inverse, then the physical output is negative when the displayed data are positive and vice versa.
Calculation of scaling factors
As all input channels and all output channels (except the Lock-in
channels) are inverted, the equation for the scale factor is:
\(Phys. value = - Scale factor * Num. value\)
Example 1: The maximum voltage output of the DAC is 10 V and the related
maximum num. value is 32000. Then, the scale factor is 0,3052 to obtain
an output display in mV.
Example 2: The maximum voltage output of the DAC is 10 V and the related
maximum num. value is 1e9. Then, the scale factor is 1,07e-5 to obtain
an output display in mV.

Feedback¶
The feedback window allows to select the feedback mode. Select any of the available modes using the dropdown list. The corresponding mathematical description of the feedback is displayed below. This description can be used to check which input channel is used for the feedback.
The following table summarizes all the available modes and their corresponding feedback input channel:
| Mode | Description | Feedback Input |
|---|---|---|
| Off | no distance feedback | None. This mode is used to control the piezo scanner with the Joystick |
| STM general | standard STM mode | It = AD channel 1 |
| STM abs() | STM mode, uses absolute value as feedback input | It = AD channel 1 |
| STM log(abs()) | STM mode, uses log of absolute value as feedback input | It = AD channel 1 |
| STM supp. Ic | STM mode with suppressed displacement current | It = AD channel 1 |
| STM adapt. Ki&Kp | STM mode with adapted feedback constants | It = AD channel 1 |
| AFM contact mode | contact mode AFM | T-B = AD channel 1 |
| AFM amplitude R | dynamic mode AFM | Amplitude LiaR (from LockIn, Channel Out12) |
| AFM amplitude X | dynamic mode AFM | LiaX (from LockIn, Channel In9) |
| AFM PLL | Dynamic mode feedback for vacuum applications with separate feedback circuits for frequency and amplitude. | Phase (from LockIn, Channel Out13) Amplitude (LockIn, Channel Out12) Topography is set from frequency feedback output |
| STM + AFM PLL | STM mode with separate feedback circuits for frequency and amplitude. | Phase (from LockIn, Channel Out13) Amplitude (LockIn, Channel Out12) Topography is set from tunnelling current feedback (It = AD channel) |
Kelvin Menu On is used to switch on Kelvin feedback in case the 2nd Lock-in amplifier is installed. When enabled, the Kelvin tab appears in the Parameter window.
Enable LockIn is used to enable the dynamic operation in contact Mode. By default, the DNC window vanishes in contact mode. It can be enabled for certain applications (e.g. Force Modulation Mode -- see chapter Operation Instruction ?????) using this checkbox. A message warning is shown, when the frequency is swept in contact mode.
Auto BW ADCs will automatically switch the internal gain switches for ????????

Spring constant entry is used to display an estimate of the contact force in contact mode. In order to display the contact force as a popup hint, move the mouse over the entered setpoint value in the Parameter Window. The system assumes that the T-B signal has been zero in a far distance between tip and sample. Also, it takes the last calibration of the sensitivity from the force distance curves (see calibration procedure here).

AutoOffset¶
This function is used to correct the offset of the feedback input channel. Click on Detect Offset to measure and determine a new offset value automatically. This value is updated in the New Offset entry. Click Apply to use the newly detected offset value which is henceforth overtaken by the program when this window is closed. One can also manually enter any desired offset value in the New Offset field.

Misc¶
Several miscellaneous settings are available for configuration.
- Save:
- Set the default path in the given entry to save images
Auto Save Scan, when enabled, will automatically save data when the scan is complete. - Z stepper motor:
- The stepper motor steps used for approach and retract can be set here. This controls the number of steps done when the AutoApproach button or the Retract button are clicked in the Parameter Window. Only works if the stepper motors are installed in the system.
Autocorrect z Violation will automatically performs a single step Z motor motion at the end of each image, if the z-position of the tip is close to the piezo's range endpoint (as close as 10 % of the total z-range). - SoftLin/HardLin active:
- Displays the activation status of the scanner linearization features of the software. More details here.
- SXM-Saver:
- Use this feature to perform an automatic Coarse Retract of the system after a certain idle time given in minutes has passed. This is used for the conservation of the LASER diode and the HV-amplifiers (Piezo output voltage set to moderate values).
- Aspect Ratio:
- Pixel Density sets the ratio of the pixel densities in X-direction
vs. Y-direction
Image Format allows to scan rectangular images. Enter the width/height ratio in the input box. Default: 1/1 (square).

- Tip-Saver:
- This feature is used to automatically perform a step motion of the tip if its position is near the scanner range end point (????different from autocorrect z violation???). The Tip-Saver function is activated only, if the system is in the state "Approached" (see the bottom status message line in the Parameter Window). If the system
is in the state "Coarse Retracted", the function is deactivated and the
counted number of single "One step" functions previously performed during Tip-Saver is reset to zero.
'OneStep' on Red Tip when enabled, the most retracted position of the tip is monitored during approached state.
'OneStep' on Yellow Tip when enabled, the most extended position of the tip is monitored during approached state.
If one of the above cases is true, the function behind One Step in the parameter window is carried out.
Dead time: During "One Step", the piezo in z-direction is automatically and fully retracted and the feedback is disabled. After the step, the feedback is enabled again and the tip automatically approaches to the sample with the speed defined by the feedback settings. Depending on the system parameters, this approach movement in feedback can take some time and the tip might (for instance) be found in the "red" position for some time after "One Step" was carried out. In order to avoid that the "One Step" function is repeated without giving the tip a chance to re-approach again to the surface, a Dead time can be defined. It is the minimum time for which the Tip-Saver function is not active and thus the minimum time between two calls of this function. In order to define this Dead time correctly, release the tip completely by choosing the Piezo option from the right click menu of the Retract button and estimate the time the tip requires to move trough the available z-range.
max. Steps defines the maximum number of single steps that can be performed by the Tip-Saver function. There can be reasons to set this, for instance, if the tip is completely broken in dynamic mode AFM which could result in a constantly retracted tip.

The number of already performed steps are shown as a hint when the mouse is hovered over the edit field behind max. Steps (within the red circle in the right image). The number of performed
steps itself is displayed in the bottom status bar of the SXM Main Window. Negative number indicates the number of steps towards the sample (after yellow tip colour) and positive number indicates the number of steps away from the sample (after red tip colour). If backwards and forward steps occur subsequently, this counter counts up and down until the absolute value equals max. Steps. Then, the activated function, shown in bold letters in the right click menu of the Retract button, is called.

Joystick¶
Starting from version 28.26, it is possible to use a joystick to control
the microscope positioning motors. Copy the latest program "sxm.exe" and "SDL2.dll" to the installation directory: ../Anfatec/bin/.
The following game controllers are supported (SXM version>=28.26):
-
Playstation 5 DualSense Controller
-
XBOX Wireless Controller
-
Logitech Wireless Gamepad F710

Warning
Set the Logitech Gamepad's toggle switch to “X” mode, do not set it to “D” mode! Check in Windows Device Manager for “Xbox 360 Peripherals” to ensure that the device is recognized.

In the left upper window, a list of detected "Game Controllers" are displayed. Click on the desired controller to be used. In the left lower window, the position of the handles are graphically displayed. Blue dots indicate motion in X and Y directions, controlled by moving either the left handle (coarse motion) or left buttons (single steps, if supported) of the joystick. Red dots indicate motion in Z direction, controlled by moving the right handle (coarse motion) or right buttons (single steps, if supported) of the joystick. The corresponding X,Y and Z handle position are reported in the right panel, including all other knobs.
Note
- When the system does not react to the joystick, it might be in sleep mode. Press one of the front buttons to awaken it.
- If the tip is approached by automated approach, it will not react to the joystick (in order to avoid a crash of the tip).
It is possible to change the direction mapping of the joystick handles. This is done in the ini file under the following entries:
[Joystick]
JoyItemX=0
JoyItemY=1
JoyItemZ=3
Set a value to "-1" to disable joystick motion in that direction. JoyItemZ=3 means, that the 4th entry in the list on the right panel of the Joystick window is used for Z-movement. Interact with the joystick handles and monitor which entry in the list changes bit value in order to find out the correct entry corresponding to that handle to be mapped.
One can also move the piezo scanners (outputs X, Y, and Z of the controller) using the joystick, if the Feedback Mode is Off. This function is used in combination with the CurrentPosition display in the Scripting Window.
In the Level-AFM, the x-movement and the y-movement is disabled, because there is no automated x-y-tablet available. Then, the entries JoyItemX=0 and JoyItemY=1 have no effect, except for the case when Feedback Mode is Off.
For the speed adjustment of the joystick, refer to the coarse movement setup. Additional joystick setup can be done in the ini entries described here.

LEDs¶
Depending on the installed hardware , this window allows software control the brightness of two LEDs that are connected to a I2C-interface on the Head-Connector and a Power-LED which usually has its own output connector. Three sliders are provided to control the green and white LED intensity separately and the the total power of the LEDs.
HighSpeedSettings¶
This window appears only for High-Speed controllers (with PCI card AMU2.9). It only has an effect if the High-Speed Mode really is enabled. Its main functionality is checking hardware registers used in high-speed mode.

There are only two parameters that are of interest for High-Speed AFM users:
- left
- equals the delay that the filters for the fast motion DAC causes. If the fast scan direction is X, then it is the sum of all filter delays for all X filters.
- top:
- is an amount of lines ignored for high-speed scanning at the beginning of each image.
Scanner¶
This window contains all settings for the scanner. The head-line of the window displays the file name and location of the selected scanner file.

- File menu:
-
Scanner files can be generated (New), opened from the hard drive (Open), saved with the same (Save) or a different name (Save As). Usually, scanner files are located inside the Anfatec/bin/ini/ folder.

- Ranges menu:
-
Allows to Add or Delete ranges from the list in the first tab Scan Range.
Sort assorts the new ranges according to their size. When a scanner file is saved, the ranges automatically are sorted by size. 
- Scan Range:
-
Contains a list of ranges that are used to correctly scale the scan size depending on the set Range value in the Parameter Window. The unit of Range is taken from the x-direction channel (Options → Scale → DAC → channel DAC2).
Add a range in the list: enter the range in Parameter → Range. Choose Ranges → Add.
Delete a range from the list: select one element in the line to be deleted. Choose Ranges → Delete.
Note
Behind each range entry, a scaling coefficient for X and Y is stored. The scaling coefficients are displayed in the graph on the right side (see image) and stored in "µm/digits" (or "nm/digit").
Max Range [V] allows to define the total HV voltage range used for
the XY-piezos. This value is used to calculate the piezo sensitivity in
nm/V when the Y-Axis scaling is chosen to be nm/V.
In between two scan ranges, the software interpolates between the
neighboured values.
In order to calibrate a scan range:
- scan a grating with one of the scan ranges in the list
- check whether the scan is too large or too small
- choose the cross (blue to X or green for Y) for the correct scan range
and move it
- press "Enter" in Parameter → Range to overtake the new value
- scan again.
The Scan Range tab applies 0th order scan range correction. For non-linear correction, check the Linearisation X / Y tabs.
- Linearisation X / Linearisation Y:
-
contains lists with 2nd order and 3rd order polynomial coefficients for the non-linearity correction of the scan. These coefficients are between 0 and 1. They usually are applied to the scan motion output (DAC output). FWD and BWD coefficients can differ.
These coefficients are used ONLY IF use Hardlin
is selected in the Hardlin tab.
If the checkbox
in the Hardlin tab is checked,
these coefficients are taken as fixed values. If this checkbox is not
checked and the Closed Loop checkbox is not checked as well, then
system is operated in "FeedForward Mode" (Linearisation with the feed
forward mechanism is described in: B. Graffel, A.-D. Mueller, F.
Mueller, M. Hietschold, Rev Sci Instrum. 2007) which is nothing else than a line-wise adaption of these linearisation coefficients in dependence on the linearity measured on the sensor channels during Closed Loop operation. 
- HardLin:
-
Enabled → 2nd /3rd order correction for scanner is used
Enabled → fixed
coefficients from the list. Disabled → starting from the fixed values in
and
and using the
feedback constant
, the non-linearity coefficients are automatically adapted.
enables the closed loop operation.
If the system is operated in "FeedForward Mode", the knobs Teach X and Teach Y overtake the last found coefficients into the tables
and
.
Please contact a service engineer to learn about the correct ini-entries for the closed loop input channel selection.
Note
Ki automatically is zero if
is enabled.
Warning
Do not choose Ki too large, because this might lead to unexpected artefacts.
FeedForward Mode Linearisation
When a linear voltage ramp is applied to the x- and y-piezo (k2 and k3 are zero), the piezo lateral motion is usually not linearly (due to piezo hysteresis, scanner construction, creep, etc.). In online mode (FitPoly is checked), the hardware needs to provide two signals from two input channels. In the Level-AFM, these are two strain gauge outputs called "DMX" and "DMY", which are connected to the AD-converter channels AUX5 and AUX6 and linked to the input channels In14 and In15 (see the description of the Scale Window). With the ini entry [hardlin] → InX=14 and [hardlin] → InY=15, these two channels are provided as input channels for the online-hardware linearisation.
Now, based on these measured values, the system approximates the detected movement with a polynomial of 3rd order and displays the coefficients A (offset) to D (3rd order). Based on the knowledge of the last coefficients and this new approximation, it calculates a 2nd order polynomial for the voltage ramp to be applied to the x- and the y-piezo for the next scan line. The coefficients of this voltage polynomial are displayed here as Lin^1, Lin^2 and Lin^3 in two lines for the two directions.
As this is a feedback, it does not react with the full strength to a requested change in the coefficients (this avoids jumps and overreaction on wrong or noisy signals). Moreover, it allows the user to set a Ki in order to choose, how fast the system reacts to changed linearity parameters.
The required coefficients depend on scan speed, scan window size, scan window position. Therefore, they might change when the central position (x-Center, y-Center) are changed or the scan range is changed. Depending on Ki, it might take a few scan lines until the right coefficients of the new range are found.

- Z:
-
Scales the Z-direction of the scanner. In most systems, only one line appears with a scaling factor for the topography channel.
HVA Gain is the gain of the used high-voltage amplifier.
Scale is a scaling factor in units of "nm/V". If the z-calibration of a scanner is wrong, this scaling factor needs to be adpated and the software requires a restart to overtake it.
For High-Speed Controllers (with PCI-card AMU2.9) with a FastDAC (1 µs group delay) inside the Z-Channel, the checkbox enable DualZ appears. These systems can be operated with two z-Piezos when DualZ is enabled
. The 2nd channel usually is "FastZ" and can be scaled independent to "Topo" (or "ScannerZ") channel.
If a High-Speed Controller is operated with one Z-Piezo (
disabled), the 2nd line disappears, but the scaling for the 2nd channel still needs to be set correctly. If the z-calibration of this configuration is wrong, this scaling factors for both channels (Topo and FastZ) need to be similar. In order to change them,
- enable DualZ
- change both scaling coefficients
- disable DualZ
- restart the software. - Frequency Response:
-
This tab has an effect only for High-Speed controllers and closed loop operation. It allows the user to load digital filters that change the shape of the scan ramp (from the scan generator). Depending on the implemented filter revision (defined inside the controller version
), up to six subsequent 2nd order generic filters can be loaded.
The drop down list in the Scan Filter Rev. section allows the user to select any of the available filters.
allows the user to load a new filter design into the selected filter.
allows the user to disable the
selected filter.
For closed loop scanner operation, special filter designs are loaded into the entries for X1 and Y1. These filters do not match the standard filter design. A warning
is shown which can be
ignored if the closed loop operation is intended.
Warning
Wrong filters can cause damage to the scanner!
- Power:
-
Some systems allows the user to switch the HV output off or to switch the bandwidth of the HV amplifiers here.
Scale AD/DA¶
??????
Advanced Set-Up Procedures¶
Setup of the Coarse Movement in X-Y Directions¶

Open the ini-file in an editor (Options → Edit ini). Search for the strings "coarse" and "stepper".
In the coarse-section of the ini-file, the following parameters affect the lateral movement:
- xyTranslator=1
- switches the buttons for the lateral movement in the coarse window
- SlowX
- time between two bursts in ms used if the position buttons are pressed (also set in the Coarse Move Window)
- FastX
- time between two bursts in ms used if the position buttons are pressed together with the Shift (also set in the Coarse Move Window)
- StepsX
- with each click on
button or
, the X-output recieves StepsX number of ramps. StepsY and StepsZ sets similar adjustment for Y and Z outputs. - PIAmpl
- defines the amplitude of the ramps in X and Y direction. The output voltage is set value / 1e8 in V.

In the stepper-section, the channel numbers for the lateral movement buttons have to be entered as shown:
Right = 30
Left = 29
Forward = 31
Backward = 32
If you like to switch the directions (for example left to right and vice versa), simply give the channel Right the number 29 and the channel Left the number 30.
You can check the functionality with an oscilloscope.

Usage of the Coarse Positioning¶
After the changes in the ini-file, the sidewards buttons in the coarse window should be activated. With the options menu
you can open additional settings.
The displayed parameter x-Axis → normal = 800 equals the SlowX parameter in the ini-file and the parameter x-Axis → +
The number of steps for each click and the amplitude of the ramp can only be changed in the ini-file directly.
If you press
continuously and SlowX=800, every 800 ms an amount of StepsX pulses with the amplitude PIAmpl is sent to the X-channel output. After each usage of the lateral positioning, the output voltages X and Y are set to zero. If the time given in SlowX is shorter than the time needed for the given number of pulses, an uninterrupted press of the X-button results in an uninterrupted ramp output. The same is valid for the FastX and FastY parameters.
When the Joystick is installed, the current speed achieved with the joystick is calculated from the interpolation between the delay 'min' (FastX) and 'max' (SlowX) values, as well. When used very softly, the delay 'max' allows to translate the sample in single steps. When fully extended, delay 'min' determines the maximum achievable speed.
Warning
The delay is connected to the Direct-X-Timer of the PC. If some other software (for example the USB-camera) uses the same timer extensively, it is possible that the timer for the coarse movement (fast movements) is changed. This may cause very fast movement of the motors!
Play Sound on Step enables a sound generator. This function gives a short sound, when the coarse movement is used. The number of sounds does not equal the steps, especially not, when a large number of steps is done in a short time.
High Speed is a switch for some special hardware (UHV slip stick), which allows to switch between different ramp voltages. It is not used for standard setups.
Click on
to hide the additional settings on the right part of the coarse move window.

Switches for hidden Program Parts¶
Open the ini-file in an editor (Options → Edit ini). Search for the string "software". You will find the lines shown here to switch the visibility of specific GUI elements of the software on (1) or off (0).
Check Appendix 1 (description of the ini-files) for more details.
Joystick Setup¶

If the joystick does not work properly, one should check the corresponding ini-entries of the currently used ini-file (Options → Edit ini) as shown.
The entry [Tolerance] allows to make the joystick less sensitive against small deviations from the central position. The entry [SelectPoint] is the number of the button used to save the current x-y-z-position together with the data in channel AD4 in the select window.
With use=0, the joystick can be disabled.
An entry JoyItemX=-1 disables the movement for that direction.
Setup of HVA and Scanner Gains (from vers. 21B)¶
Warning
This procedure should be done by authorized personal, only! It requires a login in Main-Admin mode of the software.
The usual chain of stages towards the scanner's movement consists of
-
low voltage output of a D/A channel (e.g. channel 0 for Z) with -10 V to 10 V output
-
High voltage amplifiers (with a certain HVA gain, e.g. 7.5 for 75 V)
-
Piezo gain provided by the piezo producer typically is given in units of nm/V
The D/A channel gains are usually already set. If not, one can use the Scale AD/DA Window under Options menu to do it.
The output then is calculated as:
digital number [digits] * DA-Gain [V/digit] * HVA-Gain [V/V] *
Piezo-Gain [nm/V] → nm
The HVA gains are saved in the ini-file file, because they are basic parameters of the microscope.
Make yourself a high-level administrator by selecting and entering the password "anfatec".
Open the used ini-file from the software (Options → Edit ini) and search for the string "TestMic" in the ini file:

Add entries for the DA-channels 0 (this channel equals "Topo", the entry is: Gain0), 2 and 3 (these channels equal X and Y, the gain entries are Gain2 and Gain3) as follows:
Gain0=15
Gain2=15
Gain3=15
GainzFast=15 // this is for the fast Z-channel in high-speed systems
These gains are the amplifications of the high-voltage amplifiers. In your case, these numbers should be 15.
The Piezo Gains are saved in the scanner file, because they might be different for each scanner. Open the used scanner file. One can find this file by first opening the Scanner Window (Options → Scanner). The used scanner file path is displayed on the title bar. Navigate to that location and open the scanner file with Notepad
Add the following lines:
XGain=0.39
YGain=0.39
ZGain=60
ZFastGain=30
The numbers behind these entries are the piezo constants in units like "nm/V" for z-directions and "µm/V" for x- and y-direction. The volts are the volts of the HV amplifier.
Calculation example
A piezo stack with 150 V maximum voltage supply and 9 µm maximum movement range has a piezo gain of 9 µm / 150 V = 60 nm/V.
How to check the settings:

For the two possible z-channels, the piezo gain and HVA gain are displayed in the Z-tab of the scanner window:
For the X-Y-direction, the gains are used to display the scan range calibration coefficients in units of "nm/V" as typically provided by the piezo supplier:
Go to the tab Scan Range in the Scanner Window.

Enter the correct maximum voltage that the HV amplifier output can supply in the field below "Max. Range [V]". For a -150 V to 150 V amplifier, this voltage is 300 V. For the 0 V to 150 V amplifier, this voltage is 150V.

Chose the tick "nm/V" instead of "µm/digit", and the entries in the scan range table are recalculated in nm/V and displayed in this unit. The vertical axis should be approximately the value that was entered as "XGain" in the scanner file.
Revision History¶
From 15 to 16
-
Move the channel LiaR and Phase from the input channels to the output channels -> allows the acquisition of the Amplitude in Fly mode.
-
Change the numbering of the output channels and extend the width of Amplitude and Phase to 32 Bit
From 16 to 17
-
Visualization of the tip-position vs. sample
-
Single Step and automated Stepper Off function
From 17i to 17 j/17h
-
Add the function "Level" in the Parameter Window in order to subtract the sample plane from the current z-position during scan and thus to improve the feedback control during scan
-
Transfer of the function "Fly" from the menu "Options/Acquire" to the "Parameter Window" as new tab.
-
Extend Fly-function by adding a planar scan in a height and to allow to switch it off.
From 17h to 18d
-
Add a Game Pad function ("Options/Joystick"), which allows to control the coarse movement by a game pad.
-
Extension of the Coarse Move functions to adapt the Omicron Slip-Stick Control
From 18d to 18e
- Removal of an incompatibility between the SPIP Software dongle and the Game Pad
From 18e to 18k
-
Scanner movement with joystick in Select-Window
-
Switch between Admin and User mode
-
System hints for image time and system status
From 18k to 18u
-
Implementation of a complete script language (replaces the old script)
-
Light adjustment from program + camera On/Off
From 18u to 18w
-
Implementation of new script language
-
Removal of KP feedback bug
From 18u to 19a
-
New driver version 0.7.0 -- check of driver compatibility
-
Unused channels for the Multi-Channel lockin are not acquired, if they are disabled in scale
-
Display of phase in DNC
From 19a to 19c
-
Sync filter implemented for the AMU2.6 board
-
ApproachDeadTime implemented (waiting time between steps for coarse approach)
-
Command 'SETLASER' in the script language
From 19 to 20
- Compatibility to Windows 7
From 20 to 21
-
Implementations for the Fast Scan controller and a Multiple-Channel USB-SPM-Controller
-
accessibility from LabView, SciLab and MatLat
-
new script functions (e.g. GETCHANNEL)
-
dynamic scanner linearisation
From 21 to 23
- Visualization of Piezo voltages in [Options → Scanner → Z]
New in Version 26.xx
- Convention for where and how to safe data [File → Set Save Path ...]

-
Matrix-Spectroscopy / Line Spectroscopy\ accessible inside acquired image
-
Present version that relates spectroscopy data to the image data
Version 27
- possibility to redirect internal signals (R, Phi, ....) to analogue outputs of the controller
Version 28
- 1st compatible Version for Anfatec Controllers Gen2 (PCIe card and external lockin amplifier)
