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

Chapter 4
Programming

Example 2

PCI E Series RLPM
12. Call the function
Write_Strobe_1_Register
Write strobe 1 = 1;
13. Now start the acquisition with
AI_Command_1_Register
Convert Pulse = 1;
14. 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 (FIFO not read)
Example 2 illustrates the manner in which to program the STC for
scanning.
Acquire 5 scans at a scan interval of 1 ms. The scan list contains channels
5, 4, 1, and 0, respectively. The channels are configured as RSE at a gain of
1. Within each scan, the sample interval should be 100 µs. Dithering should
remain off during the operation. No external multiplexers are used. Use
polled input to acquire the 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-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 clear the ADC FIFO.
Clear_FIFO
AI_Start_The_Acquisition
to load the number of scans.
Number_of_Scans
4-12
© National Instruments Corporation
.

Advertisement

Table of Contents
loading

Table of Contents