Chapter 4 ProgrammingPCI E Series RLPM4-14 ©National Instruments Corporation9. Call AI_Arming to arm the analog input counter.AI_Command_1_RegisterAI SC arm = 1;AI SI arm = 1;AI SI2 arm = 1;AI DIV arm = 1;10. The function AI_Start_The_Acquisition starts the acquisitionprocess.AI_Command_2_RegisterAI START1 Pulse = 1;11. Poll the AI FIFO not empty flag in the AI_Status_1_Register until notempty and read the ADC FIFO data in the ADC_FIFO_Data_Register.Do{If (AI FIFO not empty) thenread FIFO data;} while (20 samples have not been read)Example 3Example 3 performs the same acquisition as Example 2, but withinterrupts.Acquire 5 scans at a scan interval of 1 ms. The scan list contains channels5, 4, 1, and 0 respectively. The channels are configured as RSE at a gain of1. Within each scan, the sample interval should be 100 μs. Dithering shouldremain off during the operation. No external multiplexers are used. Useinterrupts to acquire the data.Only minor modifications to Analog Input Example 2 are needed for thisexample. Instead of installing the interrupt service routine (ISR) as aninterrupt, this example emulates the operation of the interrupt by polling thestatus register in the DAQ-STC. When the status register indicates aninterrupt, the main loop transfers control to the ISR. To use the exampleISR as an actual interrupt, learn how to install software interrupts on yoursystem. Generally, the procedure is as follows:1. Determine the software interrupt number corresponding to the IRQline you are using.2. Use the OS specific functions such as getvect() and setvect() forDOS to replace the default interrupt handler with your ISR. You shoulddisable interrupts during this step.3. Reset the interrupt controller hardware.