Chapter 4
Programming
©
National Instruments Corporation
4-15
4.
Perform your analog input.
5.
After the analog input operation completes, re-install the default
interrupt handler.
Example Program
1.
Perform Analog Input Example 1 Step 1.
2.
Perform Analog Input Example 1 Step 2 for each channel in the scan
list. Only channel 0 has Last channel set to 1.
3.
Perform Analog Input Example 1 Steps 3-9.
4.
Call the function
Number_of_Scans
to load the number of scans.
Joint_Reset_Register
AI configuration start = 1;
AI_SC_Load_A_Registers (24 bits)
Number of posttrigger scans -1 = 4;
AI_Command_1_Register
AI SC Load = 1;
Joint_Reset_Register
AI configuration start = 0;
AI configuration end = 1;
5.
The function
AI_Scan_Start
selects the scan start event.
Joint_Reset_Register
AI configuration start = 1;
AI_Start_Stop_Select_Register
Start edge = 1;
Start sync = 1;
AI_SI_Load_A_Registers (24 bits)
AI SI special ticks -1 = 1;
AI_Command_1_Register
AI SI load = 1;
AI_SI_Load_A_Registers (24 bits)
AI SI ordinary ticks -1 = 19999;
Joint_Reset_Register
AI configuration start = 0;
AI configuration end = 1;
6.
Perform Analog Input Example 1 Step 11.