National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference WFM_Load
©
National Instruments Corporation 2-431 NI-DAQ FRM for PC Compatibles
Assume the following conditions:
Update rate of the waveform is = U Hz,
Accumulator size is = n bits,
Desired frequency is = f Hz
Then, the DDS Frequency word [63:0] is= (f * 2
n
)/U.
Note For the DAQArb 5411, accumulator size n is 32 bits.
Example: If one cycle of sine wave already is loaded into the lookup memory by calling
WFM_Load with mode = 2 and U = 40 MHz, use the following formulas for the frequency you
want:
1MHz: DDS Frequency Word [63:0] = (1,000,000 * 2
32
)/ 40,000,000 = 107,374,182.
1.234567 MHz: DDS Frequency Word [63:0] =
(1,234,567 * 2
32
)/40,000,000 = 132,560,622.
1kHz: DDS Frequency Word [63:0] = (1,000 * 2
32
)/40,000,000 = 107,374.
25Hz: DDS Frequency Word [63:0] = (25 * 2
32
)/40,000,000 = 2,684.
1.256 kHz: DDS Frequency Word [63:0] = (1,256 * 2
32
)/40,000,000 = 13,486.
Note For the DAQArb 5411, the maximum sinewave frequency that you can generate is
16 MHz. The corresponding maximum valid DDS Frequency Word is
1,717,986,918.
You also can specify the duration you want the frequency to be generated for each stage. This
duration is specified in number of 5 MHz interval (200 ns) counts. The duration in 5 MHz
interval [31:0] is divided into two 16-bit unsigned words as shown in the previous array. For
DAQArb 5411 devices, the range for the duration in 5 MHz interval [31:0] is through
16,777,215. Also, you can refer to the triggering modes in your DAQArb 5411 User Manual
for more details on the various operation modes available.
ARB Mode
Table 2-43.
Array Structures for ARB Mode
Buffer ID Array Element
Buffer ID[31:16]
Array element 0 (range 0 to 65,535)
Buffer ID [15:0]
Array element 1 (range 0 to 65,535)
Sample Count [31:16]
Array element 2 (range 0 to 65,535)
Sample Count[15:0]
Array element 3 (range 0 to 65,535)