Strain conversion sequence – VXI VT1422A User Manual

Page 169

Advertising
background image

Advanced Programming with the VT1529B 167

Chapter 5

Strain Conversion

Sequence

Below is an example VXIplug&play command sequence. Note that this is
not executable; it has been simplified for easier reading. The C++ example
source file (eupost.cpp) is on the CD supplied with the instrument.
View the readme.txt file provided with the VXIplug&play driver for
example program file location.

/* set function to strain; note ch 10006 is excitation voltage */

errStatus = hpe1422_cmd(vi,

"sens:func:str:hben:post auto,(@10006),(@10000:10005)");

/* optionally set VT1529B input filters (2, 10 or 100 Hz) */

errStatus = hpe1422_cmd(vi, "inp:filt:freq 10,(@10000:10005)");

errStatus = hpe1422_cmd(vi, "inp:filt:stat on,(@10000:10005)");

/* set gage factors for EU conversion routines */

errStatus = hpe1422_cmd(vi,"sens:str:gfac 2,(@10000:10005)");

/* measure the unstrained bridge voltage at each bridge. The values go to the

channel EU conversion as well as the FIFO. */

errStatus = hpe1422_cmdInt16_Q(vi,"meas:volt:unst? (@10000:10005)",&result16);

/* set up the scan list to include the excitation and strain channels */

errStatus = hpe1422_cmd(vi,"rout:seq:def (@10000:10006)");

/* set up the trigger system to make one scan for each trigger.

Note that the default is one scan per trigger and trigger source

is TIMer, so we only have to INITiate the trigger system to

take readings.

errStatus = hpe1422_cmd(vi,"trig:coun 1"); /* *RST default */

errStatus = hpe1422_cmd(vi,"trig:sour tim"); /* *RST default */

errStatus = hpe1422_cmd(vi,"arm:sour imm"); /* *RST default */

/* set up the sample timer. This controls the channel-to-channel scan

rate and can be important when channels need more that the default

40 us sample time. */

errStatus = hpe1422_cmd(vi,"samp:tim 40e-6"); /* *RST default */

/* INITiate the trigger system to execute a measurement scan */

errStatus = hpe1422_cmd(vi,"init:imm");

/* retrieve one scan’s data from the FIFO */

errStatus = hpe1422_readFifoPost_Q(vi, 1, 0, 65024, f64_array);

Advertising
This manual is related to the following products: