Chapter 4
Programming
©
National Instruments Corporation
4-39
If (!VirtualFIFO)
Wait until DACs have been preloaded.
AO_Command_1_Register = 0x0554;
18. Call
AO_Start_The_Acquisition
to pulse the software START1
trigger.
AO_Command_2_Register
AO START1 pulse = 1;
19. Poll the AO_FIFO_Full_St bit and write data from the array into the
data FIFO whenever the data FIFO is not full.
while (there is more data to write)
{
while (FIFO is not full)
{
AO_DAC_FIFO_Data = data;
}
}
Example 3
This example generates a waveform using local buffer mode. This example
does not support the PCI-MIO-16XE-50 boards, because it has virtual
analog output FIFOs.
Initialize the data FIFO with a 100 point buffer. Output the buffer 50 times.
The update interval is 100
µ
s. Confirm operation with an oscilloscope.
1.
Perform Analog Output Example 2 Steps 1 through 9.
2.
Call
AO_Counting
to program the buffer size and the number of
buffers. Configure the DAQ-STC for non-continuous operation
(AO will stop on BC_TC). Load the BC counter with 49 (output the
buffer 50 times). Load the UC counter with 100 (the first buffer
contains 100 points). Write 99 to UC Load Register A (each
subsequent buffer contains 100 points).
Joint_Reset_Register
AO configuration start = 1;
AO_Mode_1_Register
AO continuous = 0;
AO_Mode_2_Register
AO BC initial load source = 0;
AO_BC_Load_A_Registers (24 bits)
Number of buffers -1 = 49;