LabVIEW (via .NET)
The Zaber Motion Library is not available as a native LabVIEW library, but the C#/.NET distribution can be called from LabVIEW using LabVIEW's .NET Core interoperability.
Note that this approach will only work correctly with LabVIEW 2026 Q1 (64-bit) or later. It has only been tested under Windows; Linux support is undetermined.
The advantage of this approach over the Zaber native LabVIEW library is that you can make use of the much larger range of functionality that the Zaber Motion Library provides.
The downsides are that you have to find and add the right DLLs to your LabVIEW project, and updating to a new version of the Zaber Motion Library will involve updating the DLL references.
Project Setup
Creating a LabVIEW project is outside the scope of this article; refer to the LabVIEW documentation to get started. The rest of this section is about configuring your project to use the Zaber Motion Library.
Obtaining Zaber Motion Library DLLs
Once you've created a LabVIEW project, you can add references to .NET DLLs to the project in order to gain access to their functionality. You must keep the DLLs somewhere consistent relative to your project so that LabVIEW can find them. You must also have the DLLs from any dependencies of the .NET library you are using.
It is up to you where to place these files. For this example we'll assume they are in a lib subdirectory of the
directory containing the labVIEW project.
We provide an example project that includes a C# script that will do this for you automatically. Download the example project zip file and decompress it, then run:
dotnet run --project Setup.csproj
This will put all the necessary DLLs in a lib directory below the current directory. The script has some options
as well. To see the options type:
dotnet run --project Setup.csproj -- --help
Configuring Your LabVIEW Project
The next step is to add references to all the DLLs to your project file. In the project window, select
the Items tab, then right-click on My Computer and select Add -> File... from the menu. Browse to your lib
directory and select all of the DLL files you obtained above.

If you intend to build an executable from your LabVIEW project, you should also add the same DLLs to the executable's build files property as shown in this NI Knowledge Base article.
Updating Zaber Motion Library
To update an existing LabVIEW VI to a new version of the Zaber Motion Library, first close LabVIEW and download the new DLLs using the same procedure outlined above. When you open your VI the .NET nodes should appear broken because they were bound to a different version of the DLL.
You can fix them by re-browsing for the new DLL using the same menu as when you first created the nodes as shown above, or if you have a lot of them you can try a global redirect as described in this article.
Calling Functions
LabVIEW VIs have the ability to call functions in external libraries written in C, C# or Python using special node types called Invoke nodes. Of the programming languages supported by both LabVIEW and the Zaber Motion Library, C# is the most convenient one to use.
The general pattern is that you create an Invoke node with a reference to the Zaber Motion Library C# DLL to call a static method that returns an object, then use other Invoke nodes to call methods on that object, or Property nodes to read or write properties. You must add the DLLs to your project as described above before you can do this.
Most of the nodes you will want to use are in the top row of the Connectivity -> .NET palette:

- Use
Constructornodes to create instances of types from the Zaber Motion Library. - Use
Propertynodes to get or set property values on instances of our types. You can also use these to read enumeration values. - Use
Invokenodes to call either static or instance methods on Zaber objects. - Use
Close Referencenodes to dispose of Zaber objects that hold system resources, if you need to explicitly control their lifetimes. Usually you can leave this to the .NET garbage collector to do automatically.
Look at the example project to see how these are meant to be used with the Zaber Motion Library.
When creating these nodes, you must select the DLL each type and function comes from. As an example of how to connect a
node to the Zaber Motion Library DLL, add an Invoke node from the palette to the block diagram. Then right-click on
the method connection and select the Select Class -> .NET Core -> Browse... menu option.

A dialog will pop up with a list of available .NET libraries to select from. The first time you do this, the Zaber
Motion Library will not be in the list. Select Browse and select the Zaber.Motion.dll file from your
project's lib directory.
You will then see a list of namespaces and classes to select from. For this example we selected Zaber.Motion.Ascii.Connection
and then clicked on the method connection again and selected the static OpenSerialPort method.

Further detail is beyond the scope of this article. You can find more information about using the LabVIEW .NET integration online, for example in this article and this article.
In particular, note that many functions have default values for their parameters, but they may not be indicated as optional in LabVIEW. See the API documentation to find out what the default values are, so you don't need to clutter your block diagram by connecting extra inputs. You can also tell if a necessary input is not connected if your VI run button is disabled.
You may continue the Getting Started guide by running the example code.