Chapter 4
Programming
©
National Instruments Corporation
4-21
transfers finish, call
MITE_DMAdisarm
twice for DMA channel 0 and
channel 1.
Example 5
Example 5 performs the same acquisition as Example 2, but with the start
trigger and scan start pulses applied externally.
Acquire 5 scans. The scan list contains channels 5, 4, 1, and 0, respectively,
each at a gain of 1 and in RSE mode. The acquisition should begin on a start
trigger applied to PFI0. The sample rate should be set to 100
µ
s, and the
start pulses should be connected to PFI1 to trigger each scan. Use polled
input to read the AI FIFO data.
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 through 8.
4.
Call
AI_Trigger_Signals
to set the triggering options.
Joint_Reset_Register
AI configuration start = 1;
AI_Mode_1_Register
AI trigger once = 1;
AI_Trigger_Select_Register = 0x8061;
Joint_Reset_Register
AI configuration start = 0;
AI configuration end = 1;
5.
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;
6.
The function
AI_Scan_Start
selects the scan start event.
Joint_Reset_Register
AI configuration start = 1;