VXI VT1422A User Manual

Page 91

Advertising
background image

Programming the VT1422A & VT1529A/B for Remote Strain Measurement 89

Chapter 3

/* set channel function for voltage readings (autorange) */
errStatus=hpe1422_cmd(sessn,"sens:func:voltage auto,(@10000:10007)");

/* set bridge configuration switches */
errStatus=hpe1422_cmd(sessn,"sens:str:bridge fben,(@10000:10007)");

/* optionally set VT1529A/B input filters (2, 10 or 100 Hz) */
errStatus = hpe1422_cmd(sessn,"input:filter:frequency 10,(@10000:10007)");
/* optionally enable VT1529A/B input filters (approx 100 kHz when OFF) */
errStatus = hpe1422_cmd(sessn,"input:filter:state ON,(@10000:10007)");

/* enable excitation voltage to strain bridges. Note that excitation is
switched in banks of channels. So "VT1529A/B relative" channels to switch
are 0, 8, 16 and 24. The channel-range shown works too and is easier. */
errStatus=hpe1422_cmd(sessn,"sense:strain:excitation:state ON,(@10000:10007)");

/* set the data FIFO format for the command module to 64-bit */
errStatus=hpe1422_cmd(sessn,"FORM PACK,64");

/* measure the excitation voltage at each bridge. The values go to the
FIFO. We'll put them in their own array */
errStatus=hpe1422_cmdInt16_Q(sessn,"meas:volt:excitation? (@10000:10007)", &result16);

/* read the values from the FIFO. count returns number actually read */
errStatus=hpe1422_readFifo_Q(sessn, 0, 512, exc_array, &count);

/* measure the unstrained bridge voltage at each bridge. The values go to the
FIFO. We'll put them in their own array */
errStatus=hpe1422_cmdInt16_Q(sessn,"meas:volt:unstrained? (@10000:10007)", &result16);

/* read the values from the FIFO. count returns number actually read */
errStatus=hpe1422_readFifo_Q(sessn, 0, 512, uns_array, &count);

/* set up the scan list to include the strain channels to measure bridge outputs */
errStatus=hpe1422_cmd(sessn,"route:sequence:define (@10000:10007)");

/* 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(sessn,"trigger:count 1"); /* *RST default */
errStatus=hpe1422_cmd(sessn,"trigger:source TIMer"); /* *RST default */
errStatus=hpe1422_cmd(sessn,"arm:source IMMediate"); /* *RST default */

/* set up the sample timer. This controls the channel to channel scan
rate and can be important when channels need more than the default
40 microsecond sample time. */
errStatus=hpe1422_cmd(sessn,"sample:timer 40E-6"); /* *RST default */

/* INITiate the trigger system to execute a measurement scan */
errStatus=hpe1422_cmd(sessn,"INIT:IMMediate");

/* retrieve readings from FIFO. Notice that for each scan, we read the
number of values in the FIFO (sens:data:fifo:count?), then apply
that value to control the number of readings we read with the
hpe1422_readFifo_Q() function. For continuous data acquisition, see
Chapter 4 of the manual under "Reading Fifo Data." */
errStatus=hpe1422_cmd(sessn,"INIT:IMMediate");

/* find the number of readings present in the FIFO */
errStatus=hpe1422_cmdInt32_Q(sessn,"sense:data:fifo:count?",&result32);

/* read the values from the FIFO. count returns number actually read */
errStatus=hpe1422_readFifo_Q(sessn, result32, 512, brdg_array, &count);

/********************** Strain post-processing ***********************
* *
* here you take the values for excitation (exc_array), unstrained *
* (uns_array), bridge output values (brdg_array) and gage factor *
* and calculate individual strain values for each channel using *
* your own equations. *
* *
*********************************************************************/

Advertising
This manual is related to the following products: