Software/Labview Library
The Labview Library has been replaced. We have published an official Labview Instrument Driver, and you should use that instead. This page is just here to document the previous version.
The Labview library includes subVIs and type definitions that make it easy to start controlling Zaber devices with Labview. It also comes with several sample VIs that demonstrate how to use the library.
Installation
Download the Labview library zip file and unzip it somewhere on your computer. You can open any of the sample VIs, or you can copy the lib folder into your own project.
Sample VIs
A list of commands

The simplest VI you can write is just a list of commands with no logic. The block diagram makes a request, waits for the response, and then makes the next request until it gets to the end of the list.
This VI makes the device number 1 take 5 steps backwards, and then extend back to where it started. Select the COM port on the front panel before running this VI. The device has to start at least 50000 microsteps away from the home position, so if you receive error response 21, just extend the device before running the VI.
Looping

You can repeat commands using a loop structure like for or while. This example shows how to use for to replace the five Move Relative -10000 commands in the previous sample.
Note that the error line needs to use a shift register in the loop, so that an error will get carried forward through following iterations.
Now that you've seen two, here are some features common to most of our examples:
- Place error and COM port wires in a straight line across the bottom. This is the main data flow of the diagram.
- Start with Config Serial to set timeouts and other things, and end with VISA Close. If you don't use VISA Close, Labview won't complain but other applications won't be able to use the COM port.
Input and output

You can ask the user for input through controls and display the responses through an indicator. This sample asks the user how many moves to make, how big each move should be, and which device to use. It also shows how to build a request cluster using the Bundle function and then change it using the Bundle By Name function.
In addition to the error and COM port wires, we now have a Responses wire flowing along the bottom of the diagram. We wire the responses indicator inside the loop so that the response list will get updated after each command finishes.
Response Data

Most commands return some kind of data, and you can use that data. In this sample, we check that there is room for the movement before starting. This sample introduces the Unbundle By Name function, as well as conditional logic using the case structure.
Note that not all commands are included in the drop down list. This example uses command 53: Return Setting with command 45: Set Current Position as the data value. To use a command that's not in the drop down list, select <Other>... and then type the command number. See your user manual for a complete list of Zaber motion device commands or joystick commands.
MultiMove

This sample is more general purpose than the previous ones. It lets you enter a list of commands and then executes them, waiting for each response before sending the next command. If you send any commands to device 0 (All devices) or any group aliases, be sure to tell each command how many responses to wait for. This sample is similar to the script editor in the Zaber Console.
Write and Read

Another general purpose sample. It lets you send one command at a time and displays any responses that come back from the device. This is useful if you want to see responses that aren't caused by requests from the computer, such as manual control or joystick control. This sample is similar to the command grid in the Zaber Console.