Installation¶
Installation of LabOne¶
In order to use any LabOne API a LabOne Data Server needs to run within the network. The LabOne Data Server is the Software component that enable the communication with one or multiple Zurich Instruments Devices.
The easiest way to install the complete LabOne stack is by using the LabOne installer. Please follow the LabOne Setup guide.
Note
If the LabOne Data Server is running on a remote server, e.g. a central server, LabOne does not need to be installed but only the used API sources.
Separate LabOne API sources¶
All LabOne API sources, except the Python API, are included in the LabOne installer. The default paths are the following:
- Windows
C:\Program Files\Zurich Instruments\LabOne\API
- Linux
<extracted_tar_ball>/API
- MacOS
/Applications/LabOne xx.xx.app/Contents/Resources/API
In addition to the LabOne installer, all API sources can be downloaded directly from the Download Center.
Warning
The LabOne API and Data Server version must match. It is also strongly recommended to use the latest available LabOne version.
LabOne API setup¶
All Python package are available on pypi and can be installed with pip. All actively supported python packages (currently > python 3.7) are supported.
It is recommended to install the zhinst
package which includes
- LabOne Core API package (
zhinst.core
) - Utility package (
zhinst.utils
) - LabOne Toolkit API package (
zhinst.toolkit
)
pip install zhinst
Note
Although the zhinst
package contains all packages needed one can also install or
update the individual packages directly without any downsides.
Tipp
If pip is not available to you you can download the zhinst.core
wheel directly
from the Download Center.
The C API folder includes both the include file include/ziAPI.h
and the library files
lib/*
.
One of the following platforms and MATLAB versions (with valid license) is required to use the LabOne MATLAB API:
- Windows with MATLAB R2009b or newer.
- Linux with MATLAB R2016b or newer.
- MacOS and MATLAB R2013b or newer.
No additional installation steps are required to use the MATLAB API; it’s only necessary to add the folder containing LabOne’s MATLAB Driver to MATLAB’s search path. This is done by either of the following steps:
-
To only add the MATLAB API to the current matlab session execute the
ziAddPath
script, located in your LabOne installation or the extracted zip archive of the separate MATLAB API package (Download Center).>> ziAddPath;
-
Run the
pathtool
and click Add with Subfolders. Browse to the "MATLAB" directory, located in your LabOne installation or the extracted zip archive of the separate MATLAB API package (Download Center), and click "OK". -
Edit your
startup.m
to run theziAddPath
script, located in your LabOne installation or the extracted zip archive of the separate MATLAB API package (Download Center).>> run('<path to the MATLAB API sources>/ziAddPath');
For more help on MATLAB’s startup.m file, type the following in MATLAB’s Command Window:
>> docsearch('startup.m')
To verify that Matlab is aware of the LabOne API one can open the help of the ziDAQ
object, which is the entry point into the LabOne MATLAB API.
>> help ziDAQ
One of the following platforms and LabVIEW versions is required to use the LabOne LabVIEW API:
- Windows with LabVIEW 2009 or newer.
- Linux with LabVIEW 2010 or newer.
- MacOS and LabVIEW 2010 or newer.
In order to make the LabOne LabVIEW API available for use within LabVIEW, the driver directory needs to be copied to a specific directory of your LabVIEW installation.
-
Locate the instr.lib directory in your LabVIEW installation and delete any previous Zurich Instruments API directories. The instr.lib directory is typically located at:
- Windows:
C:\Program Files\National Instruments\LabVIEW 201x\instr.lib\
- Linux:
/usr/local/natinst/LabVIEW-201x/instr.lib/
- MacOS:
/Applications/National Instruments/LabVIEW 201x/instr.lib/
- Windows:
-
Copy the directory
Zurich Instruments LabOne
from your in your LabOne installation (API/LabView) or the extracted zip archive of the separate LabView API package (Download Center) to the instr.lib directory in your LabVIEW installation as located in Step 1. Note, you will need administrator rights to copy to this directory. -
Restart LabVIEW. The
Zurich Instruments LabOne
pallet should now be available underInstrument I/O
→Instr. Drivers
The LabOne API for .NET consists of two DLLs for each platform that supply all
functionality for connecting to the LabOne Data Servers on the specific platform
(x64 and win32) and executing LabOne Modules. Therefore, the project platform of
the project should be restricted either to x64 or win32 CPU architecture. To do
this, click on the Active solution platform
box, select Configuration Manager…
to open the the Configuration Manager. In the following window click on the arrow
under platform add a New target
and choose the right platform.
For simplicity we only show the images for x64 platform, but the needed steps are analogous for the win32 platform. For x64 the two DLLs are ziDotNETCore-win64.dll and ziDotNET-win64.dll. The two DLL must accompany the executable using the functionality. The DLL files are installed under your LabOne installation path in the API/DotNet folder (usually C:\Program Files\Zurich Instruments\LabOne\API\DotNET). Copy the two DLLs for your platform into the solution folder.
To add the DLL to the project go to the solution explorer of your project and right click on References and add the ziDotNET-win64.dll
Troubleshooting
In case of problems contact us via support@zhinst.com.