3083 XP2i LabVIEW Driver Manual
3083 XP2i LabVIEW Driver Manual
Instruction Manual
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 3
——
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.
——
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.
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.
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 (inH2O or "H2O), the conversion assumes a water reference of 68 °F. For other water temperatures,
use XP2i Convert to PSI.vi and pass in the correct water reference.
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.
Units ������������������������������������������������������� Units of input pressure, case insensitive. Valid values are: PSI, inH2O, inHg, kpa, mmHg, Bar, mBar, and kg/cm2.
"H2O Temp ��������������������������������������������� Only applies if Units are inH2O, and functions as the water temperature reference. Valid values are: 4 °C, 60 °F, 68 °F.
Values are case insensitive, and the default value is 68 °F.
XP2i Initialize.vi
Opens and initialized the serial port to which the XP2i is connected. Output handle should be closed via a VISA Close.
Units ������������������������������������������������������� The units of High Peak. Valid values are: PSI, inH2O, inHg, kpa, mmHg, Bar, mBar, and kg/cm2.
High Peak (in PSI) ������������������������������� The High Peak value converted to PSI.
Units ������������������������������������������������������� The units of Low Peak. Valid values are: PSI, inH2O, inHg, kpa, mmHg, Bar, mBar, and kg/cm2.
Low Peak (in PSI) ��������������������������������� The Low Peak value converted to PSI.
Units ������������������������������������������������������� Units of output pressure. Valid values are: PSI, inH2O, inHg, kpa, mmHg, Bar, mBar, and kg/cm2.
Version �������������������������������������������������� The version number of the firmware, usually in a Ryyxx format, where yy represents the hardware version and xx represents
the firmware version.
Units ������������������������������������������������������� Units of the zero value. Valid values are: PSI, inH2O, inHg, kpa, mmHg, Bar, mBar, and kg/cm2.
Sample VIs
Two VIs are provided as examples of how to use the XP2i library. They are XP2i Test Panel.vi and XP2i Collect Pressure Point.vi.
The COM Port numeric control should be set to the proper COM port prior to executing the VI. To stop executing, press the Stop button on the VI. Do not use
the LabVIEW stop command, as it will leave the serial port open until LabVIEW is exited, or the VI is rerun and its stop button is pressed.
Data Out ����������������������������������������������� Output 2xN array of data elements. The XP2i pressure reading added to the end, with column one equal to the current tick
count minus the Start time (tick count) input, and column two equal to the sensor reading.
——
Support
Service and Support
How to contact us:
——
Web ��������������������������������������������������������� www.crystalengineering.net
Disclaimer of Warranty
LabVIEW AND THE CORRESPONDING PRESSURE GAUGE (COLLECTIVELY “PRODUCT”) IS PROVIDED “AS IS.” CRYSTAL ENGINEERING CORPORATION DOES NOT
AND CANNOT WARRANT THE PERFORMANCE OR RESULTS PURCHASER MAY OBTAIN BY USING THE PRODUCT. CRYSTAL ENGINEERING CORPORATION MAKES
NO PROMISES, REPRESENTATIONS, OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE PRODUCT’S CONDITION, ITS CONFORMITY TO
ANY REPRESENTATION OR DESCRIPTION, THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, ANY NEGLIGENCE, AND ITS MERCHANTABILITY OR FITNESS FOR
A PARTICULAR USE.
Good data processing procedure dictates that any Product be thoroughly tested with non-critical data before relying on it. The purchaser must assume the en-
tire risk of using the Product. ANY LIABILITY OF CRYSTAL ENGINEERING CORPORATION FOR A DEFECTIVE PRODUCT WILL BE LIMITED EXCLUSIVELY TO REPLACE-
MENT OF PURCHASER’S COPY OF THE PRODUCT WITH ANOTHER COPY OR, IF SO ELECTED BY CRYSTAL ENGINEERING CORPORATION IN ITS SOLE DISCRETION,
REFUND OF THE INITIAL AMOUNT PAID BY PURCHASER TO CRYSTAL ENGINEERING CORPORATION FOR THE PRODUCT. IN NO EVENT WILL CRYSTAL ENGINEERING
CORPORATION OR ITS SUPPLIERS BE LIABLE TO PURCHASER FOR ANY CONSEQUENTIAL, INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS OR
LOST SAVINGS, EVEN IF CRYSTAL ENGINEERING CORPORATION WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY.
3083.A