Logo nanonisDetail

Programming interface

The power of lego blocks: Build a fully customized experiment in LabVIEW or any other programming language

SPM Programming Interface VI overview
Overview of the available VIs in the LabVIEW Programming Interface
Custom 2D-sweep VI
This example shows how to program a custom 2D-spectroscopy routine

Competitive advantage in research is often based on the modification of an instrument that allows the researcher to perform experiments in a way nobody else has done before. Just using an instrument that everybody else already has is not enough. This is where our programming interface steps in - to give you the building blocks to design your own experiment and to automate repetitive tasks and increase efficiency.

Old systems require TTL handshakes and difficult to debug trigger electronics to communicate with external equipment - now you can directly talk to the hardware, read back full data sets from other instruments and integrate them directly with the SPM control system.

While LabVIEW provides a simple and easy to debug programming workflow, the programming language of choice might be a different one. This is where the TCP-interface steps in: All functions of the LabVIEW programming interface are available as scripts which can be implemented in languages like Python, Matlab, C++, Igor Pro and others. The only requirement is the ability to send and read commands to and from a TCP port in the Nanonis software.

The TCP interface is activated by default if you purchase the LabVIEW Programming Interface add-on for the Nanonis Mimea BP5e. It is also avaliable for all BP5 users who purchased the LabVIEW programming interface add-on in the past, without any additional costs. To be able to use it, please download the latest V5e or V5 software version from your MYSPECS account. Documentation for the TCP interface can also be found in the V5e and V5 download area within MYSPECS 

The LabVIEW API requires LabVIEW 8.2 or higher

Advantages of the LabVIEW programming interface compared to manufacturer-specific APIs:

  • No limitation in scope: Nanonis provides a real programming interface and not a custom scripting language*. The advantage is that the user has full access to all features LabVIEW provides (graphs, database access, convenient data handling, GPIB/RS232/USB access to other instruments,...) and is not limited to the features that the scripting engine provides.
  • Full development environment: The user can benefit from the full LabVIEW programming environment and debugging features. Programs can be traced step-by-step, variables inspected and run-time behavior tested. All Nanonis VIs are incorporated in LabVIEW as a user library and are readily accessed through the functions palette
  • User interface: Using LabVIEW the user can immediately design an appealing user interface coming with his routine.
  • Offline development: The development and testing of user routines can be done “offline” without the need of a real-time system. Programs can be tested with the Nanonis STM simulator and transferred to a “life” system only when all the bugs have been squashed.
  • Ease of use and quick prototyping: LabVIEW’s ease of use makes it possible to quickly develop your own custom routines without an extensive knowledge a programming language.
  • Transparent network access: The user routine can run on the same computer as the Nanonis software or on a computer on the network.
  • No electronics knowledge required: Old controllers require TTL handshakes and difficult to debug trigger electronics to communicate with external equipment-now you can directly talk to the hardware, read back full data sets from other instruments and integrate them directly with the SPM control system. TTL triggers can of course still be used for time-critical synchronization.

*The Nanonis Scripting Tool SI5 runs on the real-time system and therefore at significantly higher speed, lower latency  and with deterministic timing. It uses a custom scripting language since that is required by its very tight hardware integration.

Selection of examples included with the LabVIEW Programming Interface


  • Custom 2D-sweep: Performs a 2-axis sweep using the generic sweeper and a user output. The data are saved into an .sxm file
  • Feenstra-type spectroscopy: Runs bias spectroscopy and adjusts Z proportional to the bias voltage
  • Spectroscopy settings recall: Stores spectroscopy settings of a prticular experiment allowing the user to recall them later with a single click. The number of settings is not limited
  • 3D spectroscopy-visualization: Opens a binary file, then loops over all spectroscopy measurements and creates a map of current or differential current at a given bias voltage. The data are extracted by fitting and then displayed in a 3D-plot
  • Multiple spectroscopy measurements on a grid: This example shows how to perform multiple spectroscopy types during grid spectroscopy
  • Custom point and shoot: This is an example of a custom point and shoot spectroscopy. It performs multiple bias spectroscopy measurements after each tip movement


  • Switch scanners: The example allows to switch between two different scanners connected simultaneously to the Nanonis controller
  • Scan multiple images with different bias voltage: Define a list of bias voltages and scan the same image multiple times at those bias voltages
  • Multiple scan monitors: Generates and starts multiple scan monitors for the case that the 7 built-in scan monitors should not be sufficient


  • Bias pulses at different tip height: This routine applies a series of bias pulses at different Z-positions with constant Z-increment


  • Tip-cleaner: Moves the tip to a specified location and performs bias pulses there
  • STM-AFM switch: Switches automatically between STM and AFM modes
  • nc-AFM amplitude calibration: Uses different oscillation amplitude setpoints to calibrate the oscillation amplitude based on Z-position
  • Custom controls: Creates a custom user interface which can be used to include the most used elements
  • Image export: Converts a .sxm file to a .png or .bmp image

External equipment:

  • Custom auto-approach: Runs an auto approach with a user-provided motor module


  • Two APIs in one: A LabVIEW interface and a generic script-language TCP-interface
  • TCP interface avaliable for both BP5 and BP5e (requires up-to-date V5e or V5 software revision)
  • Develop and automate new experiments in LabVIEW or any programming language
  • Programmatically control all Nanonis modules
  • LabVIEW-Version highlights:
    • Many LabVIEW examples ready for use
    • Simple to learn - all functions available through the LabVIEW function palette
    • Fully integrated - directly develop in the LabVIEW programming environment




auto-approach VI
VI for controlling external motor controllers for auto-approach
Feenstra-spectroscopy VI
This VI allows to perform Feenstra-type bias spectroscopy measurements
VI for extracting and visualizing data in 3D
This VI interpolates or fits data taken from sepctroscopy maps and visualizes these in 3D


Your web browser is deprecated
This could effect the presentation and some functions of our website.