beautypg.com

Daqadcrdscan – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 72

background image

daqAdcRdScan

Also See: daqAdcSetMux, daqAdcSetClockSource,

daqAdcSetTrig, daqAdcRdN

Format

daqAdcRdScan(handle, startChan, endChan, buf, gain, flags)

Purpose

daqAdcRdScan

immediately activates a software trigger to acquire one scan consisting of each channel. The

scan begins with startChan and ends with endChan.

Parameter Summary

Parameter Type

Description

handle DaqHandleT

Handle to the device from which the ADC scan will be acquired

startChan DWORD

The starting channel of the scan group

endChan DWORD The ending channel of the scan group
buf PWORD

An array into which the acquisition scans will be placed

gain DaqAdcGain

The channel’s gain setting

flags DWORD

Channel configuration flags in the form of a bit mask

Parameter Values

handle:

obtained from the daqOpen function

startChan:

must be a valid channel number for the device

endChan:

must be a valid channel number for the device and greater than startChan

buf:

must be a valid pointer to memory whose size is at least equal to:

[(endChan - startChan)* (the sample size, normally 2 bytes)]
gain: s

ee ADC Gain Definition table for gain parameter values

flags:

see ADC Flag Definition table for flags parameter values

Returns

DerrInvGain

Invalid gain

DerrIncChan

Invalid channel

DerrNoError

No

error

For more details on error messages, please refer to the Daq Error Table.

Function Usage

This function will use a software trigger to immediately trigger and acquire one scan. This scan will sample
each channel selected, starting with startChan and ending with endChan. The gain setting will be
applied to all channels.

Channels must all be of the same channel type.

4.2-16 Daq API Command Reference

988594

Programmer’s Manual