Example 9 - 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 9

© National Instruments Corporation
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)
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
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
for any external multiplexers.
Joint_Reset_Register
AI configuration start = 1;
4-29
Chapter 4
Programming
to output one
configures the board
PCI E Series RLPM

Advertisement

Table of Contents
loading

Table of Contents