Chapter 4
Programming
4-26
©
National Instruments Corporation
5.
The function
AI_Scan_Start
selects the scan start event.
Joint_Reset_Register
AI configuration start = 1;
AI_START_STOP_Select_Register = 0x0021;
Joint_Reset_Register
AI configuration start = 0;
AI configuration end = 1;
6.
Perform Analog Input Example 1 Step 11.
7.
Convert_Signal
selects the convert signal for the acquisition.
Joint_Reset_Register
AI configuration start = 1;
AI_Mode_2_Register
AI SC gate enable = 1;
AI START STOP gate enable = 1;
AI_Mode_1_Register
AI CONVERT source select = 1;
AI CONVERT source polarity = 1;
Joint_Reset_Register
AI configuration start = 0;
AI configuration end = 1;
8.
Perform Analog Input Example 1 Step 4.
9.
Call
AI_Arming
to arm the analog input counter.
AI_Command_1_Register
AI SC arm = 1;
AI SI arm = 0;
AI SI2 arm = 0;
AI DIV arm = 1;
10. The function
AI_Start_The_Acquisition
starts the acquisition
process.
AI_Command_2_Register
AI START1 pulse = 1;
11. Poll the AI FIFO not empty flag in the AI_Status_1_Register until not
empty and read the ADC FIFO data in the ADC_FIFO_Data_Register.
Do
{
If (AI FIFO not empty) then
read FIFO data;
} while (20 samples have not been read)