National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference DAQ_Start
NI-DAQ FRM for PC Compatibles 2-138
©
National Instruments Corporation
If you use external conversion pulses, NI-DAQ ignores the timebase parameter and you can
set it to any value.
For DSA devices, timebase is ignored. Use
DAQ_Set_Clock to set the sampling rate.
sampInterval indicates the length of the sample interval (that is, the amount of time to elapse
between each A/D conversion).
Range: 2 through 65,535.
The sample interval is a function of the timebase resolution. NI-DAQ determines the actual
sample interval in seconds using the following formula:
sampInterval
*
(timebase resolution)
where the timebase resolution for each value of timebase is given above. For example, if
sampInterval = 25 and timebase = 2, the sample interval is 25
*
10 µs = 250 µs. If you use
external conversion pulses, NI-DAQ ignores the sampInterval parameter and you can set it
to any value.
For DSA devices, sampInterval is ignored. Use
DAQ_Set_Clock to set the sampling rate.
Note If you are using an SCXI-1200 with remote SCXI, the maximum rate will depend
on the baud rate setting and count. Refer to the SCXI-1200 User Manual for more
details.
Using This Function
DAQ_Start
configures the analog input multiplexer and gain circuitry as indicated by chan
and gain. If external sample-interval timing has not been indicated by a
DAQ_Config
call, the
function sets the sample-interval counter to the specified sampInterval and timebase. If you
have indicated external sample-interval timing, the DAQ circuitry relies on pulses received on
the external conversion signal EXTCONV* input to initiate individual A/D conversions. The
sample counter is set up to count the number of samples and to stop the DAQ process when
NI-DAQ has acquired count samples.
DAQ_Start
initializes a background process to handle storing of A/D conversion samples
into the buffer as NI-DAQ acquires the conversions. When you use posttrigger mode (with
pretrigger mode disabled), the process stores up to count A/D conversions in the buffer and
ignores any subsequent conversions. If a call to
DAQ_Check
returns status = 1, the samples
are available and NI-DAQ terminates the DAQ process. In addition, a call to
DAQ_Clear
terminates the background DAQ process and enables a subsequent call to
DAQ_Start
.
Notice that if
DAQ_Check
returns daqStopped = 1 or an error code of overRunError
or overFlowError, the process is automatically terminated and there is no need to call
DAQ_Clear
.