EasyManua.ls Logo

National Instruments PCI E Series - Example 9

National Instruments PCI E Series
162 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4 Programming
©
National Instruments Corporation 4-29 PCI E Series RLPM
13. 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 (100 samples have not been read)
Example 9
This example scans 8 channels on an AMUX-64T.
Use the default settings on the AMUX-64T, internal power, single-board
configuration, no temperature setting, and the shield unconnected. Scan
channels 0 through 7 on the AMUX-64T. Acquire 10 scans at a scan
interval of 200 µs and a sample interval of 20 µs. Connect a voltage source
to channels 0 through 3 and ground channels 4 through 7. Compare the
unscaled results to the applied voltage. Read the samples using polled
input.
1. Perform Analog Input Example 1 Step 1.
2. Perform Analog Input Example 1 Step 2 for channels 0 and 1. Only
channel 1 has Last channel set to 1.
3. Perform Analog Input Example 1 Steps 3 through 6.
4. Call the function
AI_Initialize_Configuration_Memory_Output to output one
pulse and access the first value in the configuration FIFO. This
function also configures the DIO circuitry for the AMUX-64T.
AI_Command_1_Register
AI convert one pulse = 1;
AI_Mode_2_Register
AI external mux present = 1;
DIO_Control_Register = 0x0800;
DIO_Control_Register = 0x0000;
DIO_Output_Register = 0x0000;
DIO_Control_Register = 0x0003;
DIO_Control_Register = 0x0803;
DIO_Control_Register = 0x0003;
5. The function
AI_Board_Environmentalize configures the board
for any external multiplexers.
Joint_Reset_Register
AI configuration start = 1;

Table of Contents

Related product manuals