beautypg.com

Signal conditioning vis, Acvtdata.vi – Measurement Computing UL for NI LabVIEW User Manual

Page 43

background image

Universal Library Virtual Instruments (VIs)

Signal conditioning VIs

Signal conditioning VIs

ACvtData.VI

Changed R3.3 RW (MOD)

Converts the raw data collected by AInScFg.VI or AInScBg.VI into 12-bit A/D values. The AInScFg.VI and
AInScBg.VI can return either raw A/D data or converted data depending on whether or not the
CONVERTDATA option was set. For many 12-bit A/D boards, the raw data is a 16-bit value that contains a
12-bit A/D value and a 4-bit channel tag (refer to board-specific information or the board’s hardware manual).
The converted data consists of just the 12-bit A/D value.

Summary:

Inputs:

BoardNum

[U32] - The board number assigned when installed with InstaCal. Can

be 0 to 100.

ADDataRaw

[U16] - Data and channel tags from AInScBg.VI or AInScFg.VI.

Outputs:

ADData

[U16] - Converted A/D values.

ChanTags

[U16] - Channel tags if available.

ErrCode

[I32] - Error code. See ErrMsg.VI.

Arguments:

BoardNum

The board number associated with a board when it was installed with InstaCal. The

specified board must have an A/D.

ADDataRaw

Array of raw A/D values that include data and channel tags.

ADData

Array of converted A/D values.

ChanTags

Array of channel tags, if available.

ErrCode

Error code returned from the Universal Library. Zero if no error occurred. Use the

ErrMsg VI to convert

ErrCod

e into a readable string.

Notes:

When you collect data with AInScBg.VI or AInScFg.VI and you don't use the CONVERTDATA option, you
may need to use this VI to convert the data after it is collected. There are cases where the CONVERTDATA
option is not allowed—for example, if you are using the DMAIO option with AInScBg.VI. In this case, use
this VI to convert the data after the data collection is complete.

On some boards, each raw data point consists of a 12-bit A/D value with a 4-bit channel number. This VI
separates the two and puts the A/D value into the ADData array and the channel number into the

ChanTags

array.

12-bit A/D boards: Upon returning from ACvtData.VI,

ADData

array contains only 12-bit A/D data.

16-bit A/D boards: Do not use this VI is with 16-bit A/D boards. If this function is called for a 16-bit board,
it is simply ignored. No error is returned.

43