Overview, Introduction, Data collection and the xp2i – Crystal XP2i-DP Digital Differential Pressure Gauge User Manual
Page 3: Using the library
![background image](/manuals/371537/3/background.png)
Overview
3
XP2i LabVIEW Drivers Manual
Overview
—
IntroductIon
The XP2i LabVIEW Driver Library is a set of VIs (Virtual Instruments) that implements the serial commands of the XP2i. A sample test panel is also provided to
demonstrate the use of each of the VIs, as well as a simple data plotting example.
This documentation and the associated driver library assume a reasonable working understanding of LabVIEW, and are not meant to be a tutorial or trainer on
developing applications within the LabVIEW development environment.
—
data collectIon and the XP2I
The XP2i is a command/response instrument, meaning that it waits for a command to arrive over the serial port and then takes action and responds accord-
ingly. Data collection is straightforward: issue a pressure query and the instrument will respond with the indicated pressure. The
XP2i Pressure Query.vi imple-
ments this data query.
—
usIng the lIbrary
The library is made up of two basic parts: the command and query VIs that implement the XP2i commands and queries, such as
Zero, Pressure?, and Clear
Peaks; and the supporting functions that provide common functionality. In addition, there is a sample XP2i Test Panel.vi that demonstrates the use of all com-
mands and the data collection components.
The VISA handle should be opened by using
XP2i Initialize.vi, as it will setup the correct serial parameters. This handle should then be passed to all VIs. While
each of the VIs provides a VISA resource name (dup) output, it’s not required to use this output, as the handle properties are not modified within any of the VIs.
That standard LabVIEW VISA Close can be used to close the serial port.