Chapter 2
Analog Input Timing/Control
DAQ-STC Technical Reference Manual
2-42
©
National Instruments Corporation
If (software posttrigger) then
AI_START1_Pulse = 1;
}
}
2.6.3.16 Analog Input Program
The previous sections listed functions that you can use to configure the AITM. This section
shows how to organize these functions to implement a general analog input operation. You
can use the following sequence of functions to program the AITM for any analog input
operation.
{
/*Refer to Chapter 10, Miscellaneous Functions, to set up your timebase*/
/*Before beginning the programming sequence, you may want to program the */
/*Configuration FIFO and flush the AI data FIFO, if this is appropriate for your DAQ */
/*device*/
Call
AI_Reset_All
;
Call
AI_Board_Personalize
;
Call
AI_Initialize_Configuration_Memory_Output
;
Call
AI_Board_Environmentalize
;
Call
AI_FIFO_Request_Selection
;
Call
AI_Hardware_Gating
;
Call
AI_Trigger_Signals
;
Call
AI_Number_Of_Scans
;
Call
AI_Scan_Start
;
Call
AI_Scan_End
;
Call
AI_CONVERT_Signal
;
/*You may want to clear the AI data FIFO, if applicable. If you are using an external */
/*multiplexer, such as the AMUX-64T, you must program it here*/
/*If you are using an external track-and-hold module that requires the presence of the
/*SCAN_IN_PROG signal on PFI7, you must program it here*/
Call
AI_Interrupt_Enable
;
Call
AI_Arming
;
Call
AI_Start_The_Acquisition
;
}
2.6.4 Single Scan
To acquire exactly one scan of input, a special programming sequence is required, as follows.
{
Use the programming sequence from section
2.6.3.16, Analog Input Program
.
In the function
AI_Scan_Start
, set
AI_START_Select = 31 (ground);
AI_START_Polarity = 0;