Programming as Easy as 1, 2, 3 (4 and 5)

For those developing automated test and measurement applications, an intuitive instrument driver is probably the most important tool. ZTEC understands this fact and provides “plug-and-play” instrument drivers with all their modular instrument products. These drivers provide complete access to all the instruments capabilities and can be used in most commonly used programming environments, including National Instruments LabWindows/CVI and LabVIEW. To download the latest version of all ZTEC’s instrument drivers, please visit the ZTEC customer support center.

Programming a ZTEC modular instrument could not be easier when using the instrument driver. In fact, in as few as 5 functions/VIs, a program can be written to self-configure an instrument, acquire a waveform, and perform a waveform measurement. The LabWindows/CVI and LabVIEW driver are identical with a one-to-one map of each function to each VI. The native interface (called “Functions Panels” for LabWindows/CVI and “VI Libraries” for LabVIEW) provides a consistent and familiar interface fore each environment. A windows help file is also provided for driver documentation.

Figure I: LabWindows/CVI Driver Interface (called “Function Panels”)

Figure II: LabVIEW Driver Interface (called “VI Library”)

The Function Panels and VI Libraries allow the user to easily browse through the driver and interactively develop an application. All it takes is 5 functions/VIs to get started.

Figure III shows a simple programming example using a ZT450PXI and LabWindows/CVI. First, the program is initialized using the zt450_initialize() function. This function returns a handle to the instrument that is then used by all following functions. After initialize, three functions are used to configure, acquire, and measure. The zt450_auto_setup() function, as the name suggests, performs an automatic instrument configuration. Then the zt450_read_waveform() and zt450_measure_immediate() functions are used to download the data and make a measurement.

Figure III: LabWindows/CVI Basic Example Code

It is important to note that it is not necessary to download the data to make the measurement. Instead, ZTEC products utilize an on-board digital signal processor (DSP) to perform all calculations. Also, the use of #define constants makes the program self documented and easy to read. A list of valid #define constants is provided in the driver header file.

Figure IV shows the program output, a waveform graph and measurement pop-up window.

Figure IV: LabWindows/CVI Basic Example Display

Programming this basic example is just as easy when using LabVIEW. The VI Library contains a VI for each function described above for LabWindows/CVI. Figure V shows the LabVIEW block diagram.

Figure V: LabVIEW Basic Example Code (Block Diagram)

The output, or front panel, of this example is shown in Figure VI. The measurement pull down ring was created using the “Create>Control” feature from the block diagram. This enumerated data type contains all the possible values for measurement, such as Vpp, Vrms, frequency, rise time, and many more.

Figure VI: LabVIEW Basic Example Display (Front Panel)

If you are interested in these examples, we encourage you to download them below.For the examples to work properly, the ZT450PXI LabVIEW driver must also be downloaded and installed. You can downlaod the beta ZT450PXI LabVIEW driver here.

Filename/Title / Size
Instrument Driver Example (basic_examples.zip) / 843.2 KB