beautypg.com

Daqadcrd – Measurement Computing Personal Daq rev.6.0 User Manual

Page 137

background image

Personal Daq User’s Manual

Appendix B,

887095

API Commands B-5


daqAdcRd

DLL Function

daqAdcRd(DaqHandleT handle, DWORD chan, PVOID sample, daqAdcGain gain,
DWORD flags);

C

daqAdcRd(DaqHandleT handle, DWORD chan, PVOID sample, DaqAdcGain gain,
DWORD flags);

Visual BASIC

VBdaqAdcRdSingle&(ByVal handle&, ByVal chan&, sample!, ByVal gain&, ByVal flags&)

Delphi

daqAdcRd(handle:DaqHandleT; chan:DWORD; sample:pointer; const gain:daqAdcGain;

flags:DWORD)

handle

Handle to the device for which the ADC reading is to be acquired

chan

A single channel number

sample

A pointer to a value where an A/D sample is stored. Valid values: (See daqAdcSetTag)

gain

The channel gain

Parameters

flags

Channel configuration flags in the form of a bit mask

DerrFIFOFull

Buffer Overrun

DerrInvGain

Invalid gain

DerrInvChan

Invalid channel

Returns

DerrNoError

No Error

See Also

daqAdcSetMux, daqAdcSetTrig, daqAdcSoftTrig

Program References

None

Used With

All devices

Description

daqAdcRd

is used to take a single reading from the given local A/D channel. This function will use a software trigger to immediately

trigger and acquire one sample from the specified A/D channel.

The chan parameter indicates the channel for which to take the sample.

The sample parameter is a pointer to where the collected sample should be stored.

The gain parameter indicates the channel’s gain setting.

The flags parameter allows the setting of channel-dependent options. See ADC Flags Definition table for channel flags

definitions.

This manual is related to the following products: