Contents
Overview.................................................................3
Introduction ..............................................................3
Data Collection and the XP2i ...............................................3
Using the Library ..........................................................3
Virtual Instruments ...................................................4
Library VIs .................................................................4
VI Descriptions ............................................................4
Sample VIs ................................................................9
Support .................................................................10
Service and Support ..................................................... 10
Disclaimer of Warranty ................................................... 10
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.
Overview 3
-
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.
XP2i LabVIEW Drivers Manual
Virtual Instruments
LIBRARY VIS
The XP2i LabVIEW library contains all the VIs that control and collect data from the instrument. Each of the library’s VIs is documented in the following section.
Most of the VIs have VISA handles or error clusters as inputs and outputs, and more information on these elements can be found in the LabVIEW documenta
—
tion. Inputs or outputs specific to this library are documented below.
In addition, there are two VIs that are not considered part of the library, but are provided as example VIs that use the library. These VIs are documented in the
Sample VIs section.
Note: Many of the functions return both the pressure as indicated by the XP2i, along with the units of that pressure, as well as the pressure converted to PSI.
In the case where the XP2i’s units are inches of water (inH
use XP2i Convert to PSI.vi and pass in the correct water reference.
O or "H2O), the conversion assumes a water reference of 68 °F. For other water temperatures,
2
Virtual Instruments 4
-
The VIs XP2i Query.vi, XP2i Query, 2-line.vi, XP2i Flush.vi, and XP2i Command.vi are internal functions used by the library and test panel, and are not docu
mented here. However, their block diagrams are included if you wish to browse through them.
VI DESCRIPTIONS
XP2i Clear Peaks Command.vi
—
The clear peaks command will clear the high and low peaks, effectively resetting them to the current value. This VI has the same effect as pressing the (zero)
button while viewing a peak value.
X
Inputs and Outputs
Only standard VISA handles and error clusters.
-
XP2i LabVIEW Drivers Manual