![background image](http://html1.mh-extra.com/html/omega/omb-daq-54/omb-daq-54_user-manual_3939920133.webp)
A-14 API Custom Program
Models
Appendix A
Personal Daq User’s Manual
Summary Guide of Selected API Functions
Simple One-Step Routines
For single gain, consecutive channel, foreground transfers, use the following functions:
Foreground Operation
Single Scan
Multiple Scans
Single Channel
daqAdcRd daqAdcRdN
Consecutive Multiple Channels
daqAdcRdScan daqAdcRdScanN
Complex A/D Scan Group Configuration Routines
For non-consecutive channels, high-speed digital channels, multiple gain settings, or multiple polarity settings, use the SetScan
functions.
daqAdcSetScan
Set scan sequence using arrays of channel and gain values.
daqAdcSetMux
Set a contiguous scan sequence using single gain, polarity and channel flag values
Trigger Options
After the scan is set, the trigger needs to be set. If a software trigger is selected, the start time of the scan depends on the
application calling
daAdcSoftTrig
.
DaqAdcSetTrigEnhanced
Configures the device for enhanced triggering.
Multiple Scan Timing
If the acquisition is to have multiple scans and the trigger mode is one-shot, the pacer clock needs to be set with one of the
following functions:
daqAdcSetRate
Set/Get the specified frequency or period for the specified mode.
daqAdcSetFreq
Set the pacer clock to the given frequency.
A/D Acquisition
A/D acquisition settings are not active until the acquisition is armed.
daqAdcArm
Arm an A/D acquisition using the current configuration. If the trigger source was set to be immediate,
the acquisition will be triggered immediately.
daqAdcDisarm
Disarm the current acquisition if one is active. This command will disarm the current acquisition and
terminate any current A/D transfers.
daqAdcSetAcq
Define the mode of the acquisition and set the pre-trigger and post-trigger acquisition counts, if
applicable.
daqAdcAcqGetStat
Return the current state of the acquisition as well as the total number of scans transferred thus far as
well as the trigger scan position, if applicable.
A/D Data Transfer
After the acquisition is started, the data needs to be transferred to the application buffer. Three routines are used:
DaqAdcTransferSetBuffer
Configure a buffer for A/D transfer. Allows configuration of the buffer for block and single reading
update modes as well as linear and circular buffer definitions.
DaqAdcTransferStart
Start a transfer from the Personal Daq device to the buffer specified in the
daqAdcTransferSetBuffer
command
DaqAdcTransferStop
Stop a transfer from the Personal Daq device to the buffer specified in the
daqAdcTransferSetBuffer
command
To find out whether a background A/D transfer is complete or to stop transfers, use the following function:
DaqAdcTransferGetStat
Return current A/D transfer status as well as a count representing the total number of transferred
scans or the number of scans available.
Digital Functions
(
Does not apply to Personal Daq/54
)
After the digital group is configured, the ports can be read or written a byte at a time. Note that “low/high” and “digital I/O” are
accessed a nibble at a time. A single bit of a digital channel can be read or written using the following routines:
daqIOReadBit
Return indicated bit from selected channel.
daqIOWriteBit
Send indicated bit to selected channel.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com