Example 7; Joint_Reset_Register - National Instruments PCI E Series Programmer's Manual

Register-level programmer manual, multifunction i/o boards for pci bus computers, register-level
Hide thumbs Also See for PCI E Series:
Table of Contents

Advertisement

Example 7

© National Instruments Corporation
10. Call
AI_Arming
AI_Command_1_Register
AI SC arm = 1;
AI SI arm = 1;
AI SI2 arm = 1;
AI DIV arm = 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;
if (count = 80)
reset count to 0;
} while (SC_TC flag in the AI_Status_1_Register is not set or the
AIFIFO not empty)
Example 7 performs the same scanning as Example 2, but as a single wire
acquisition.
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 START and CONVERT signals
should be applied to PFI0. 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 9.
4.
Call the function

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;
to arm the analog input counter.
to load the number of scans.
Number_of_Scans
4-25
Chapter 4
Programming
PCI E Series RLPM

Advertisement

Table of Contents
loading

Table of Contents