Справочник Пользователя для National Instruments Welding System 321645c-01

Скачать
Страница из 554
Chapter 2
Function Reference — WFM_from_Disk
NI-DAQ FRM for PC Compatibles
2-418
©
 National Instruments Corporation
fileName is the name of the data file containing the waveform data. For MIO devices (except 
AT-MIO-16X, PCI-MIO-16XE-10, and VXI-MIO-64XE-10), AT-AO-6/10, and Lab and 
1200 Series analog output devices, the file must contain integer data ranging from 0 to 4,095 
for unipolar mode and from –2,048 to 2,047 for bipolar mode. For an AT-MIO-16X or a 
PCI-MIO-16XE-10, the file must contain integer data ranging from 0 to 65,535 for unipolar 
mode, and from –32,768 to +32,767 for bipolar mode. 
For DSA devices, the file must contain integer data ranging from -131,072 to +131,071. Each 
data point is 32 bits wide but only the most significant 18 bits are used. The lower 14 bits are 
ignored and should be zero. You can move each data point into the upper 18 bits with a left 
shift operation or by multiplying it by 16,384.
startPt is the place in a file where waveform generation is to begin.
Range: 
1 through the number of samples in the file.
endPt is the place in a file where waveform generation is to end. A value of 0 for endPt has 
a special meaning. When endPt equals 0, waveform generation proceeds to the end of the file 
and wrap around to startPt if iterations is greater than 1.
Range: 1 through the number of samples in the file.
iterations is the number of times the data in the file is generated.
Range:
1 through 2
32
 – 1.
rate is the rate of waveform generation you want in points per second (pts/s). A value of 
0.0 for rate means that external update pulses (applied to OUT2 for the MIO-16 
and AT-MIO-16D, to EXTDACUPDATE for the AT-MIO-16F-5, AT-MIO-64F-5, and 
AT-MIO-16X, and to EXTUPDATE for the AT-AO-6/10 and Lab and 1200 Series analog 
output devices) determines the waveform generation rate. If you are using an E Series device, 
see the 
Select_Signal
 function for information about the external timing signals.
Range:
0.0 for external update or approximately 0.0015 to 500,000 pts/s. Your maximum 
rate depends on your device type and your computer system.
If the number of points that represent one cycle of the waveform equals count, the frequency 
of the generated waveform is related to the rate by this the following formula:
frequency = (rate/count) cycles/s
Using This Function
WFM_from_Disk
 initiates a waveform generation operation. NI-DAQ writes the portion 
of data in the file determined by startPt and endPt to the specified analog output channels 
at a rate as close to the rate you want as the hardware permits (see 
WFM_Rate
 for further 
explanation). If numChans is greater than one, NI-DAQ writes the data values from file to 
the DAC in ascending order. 
WFM_from_Disk
 always waits until the requested number of file 
iterations is complete before returning.