EasyManua.ls Logo

VTI Instruments EX1629 - Configuring Acquisition Channels

Default Icon
346 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
www.vtiinstruments.com
EX1629 Programming 75
OPENING AN INSTRUMENT SESSION
Prior to performing any programmatic actions with an instrument, a session must be opened. The
following sample code illustrates this using the EX1629 VXIplug&play driver, along with
querying the revision of the instrument driver and instrument firmware.
Sample Code
ViStatus result = VI_SUCCESS;
ViChar instrrev[256];
ViChar driverrev[256];
ViChar filename[256];
ViSession vi;
ViChar errDescription[256] = "";
/* open a session */
result = vtex1629_init(instr, VI_ON, VI_ON, &vi);
if(result != VI_SUCCESS) {
vtex1629_error_message(vi, result, errDescription);
printf(errDescription);
}
/* query the driver and firmware revision */
result = vtex1629_revision_query(vi, driverrev, instrrev);
if(result != VI_SUCCESS) {
vtex1629_error_message(vi, result, errDescription);
printf(errDescription);
}
/* display results */
printf("Driver Revsion: %s\n", driverrev);
printf("Instrument Firmware Revision: %s\n", instrrev);
Note that in the sample code above, error code checking and handling is included. The structure
used above can be used as a template for all functions. In the examples that follow, error code
checking and handling has not been included for brevity.
CLOSING AN INSTRUMENT SESSION
In order to release system resources, applications should close instrument sessions when finished
with them. The following code illustrates this.
Sample Code
/* close the instrument session*/
result = vtex1629_close(vi);
CONFIGURING THE ACQUISITION CHANNELS
Configuration of the EX1629 is an application-specific process. The following sample code,
however, will satisfy many applications and may serve as a template. The sample code does the
following:
Configures the scanlist to contain all 48 channels
Configures all channels for quarter-bridge 120 Ω strain gage EU (which also configures the
input multiplexer and completion resistors appropriately)
Sets the gain to 100X (most sensitive)
Disables the IIR filters
Sets the excitation voltage to ±2.5 V, and enables the excitation supplies
Sets the sampling rate to 100 Sa/s

Table of Contents

Related product manuals