![qutools quTAU Manual Download Page 15](http://html1.mh-extra.com/html/qutools/qutau/qutau_manual_3793622015.webp)
7
SOFTWARE
7.5.3
Device Initialization
In order to communicate with the quTAU device, the DLL has first to be initialized using
TDC init
. In case the device is not found or available, the init function returns the error
code ”2”: ”No connection was established”. Nevertheless, the DLL will still be initialized
in DEMO mode. This allows for testing and offline use of the DLL functions. On Labview,
make sure to catch this error, otherwise all subsequent DLL calls will not be executed.
An example is shown in figure
Figure 9:
Initialization,
see example
demo mode.vi
. The return code ”2” signals ”No
connection was established” and the DLL automatically switches to demo mode.
Necessary functions for the device initialization:
tdcbase.h:
int
TDC init
(int deviceId)
Additional functions related to the device initialization:
tdcbase.h:
double
TDC getVersion
()
const char
∗
TDC perror
(int rc)
double
TDC getTimebase
()
TDC DevType
TDC getDevType
()
Bln32
TDC checkFeatureHbt
()
Bln32
TDC checkFeatureLifeTime
()
int
TDC enableChannels
(Int32 channelMask)
7.5.4
Device Deinitialization
Please make sure
TDC deInit
is always called at the end of your programs.
This is
necessary to terminate the device properly and to enable a reinitialization for the next
program start.
Table 2:
Examples: Device Initialization
LabView Example
/userlib/labviewXX/examples/demo mode.vi
C Example
-
quTAU/quPSI Manual V4.0 Page 15