Chapter 2 Analog Input Timing/Control©National Instruments Corporation2-31DAQ-STC Technical Reference ManualAI_External_Gate_Select = 1 through 10 (PFI<0..9>) or 11 through 17(RTSI_TRIGGER<0..6>);AI_External_Gate_Polarity = 0 (active high; high enables operation) or1 (active low; low enables operation);AI_External_Gate_Mode = 0 (free-run gating) or 1 (halt-gating mode);}Else{AI_External_Gate_Select = 0 (disabled);}∑AI_Configuration_End = 1;End critical section;}2.6.3.7 Software Gate OperationIn order to use the software gate, the hardware gate must also be enabled. If you want to useboth the software and hardware gate at the same time, configure the hardware gate and thenstart your application. If you only want to use the software gate, configure the hardware gateas indicated in section 2.6.3.6, Hardware Gate Programming with the following changes tothe settings:• AI_External_+Gate_Select = 31;• AI_External_Gate_Polarity = 1;Note The hardware gate must be enabled in order for the software gate to operateproperly.To use the software gate, issue the following commands:• To pause analog input:AI_Software_Gate = 1;• To resume analog input after pause:AI_Software_Gate = 0;Notes Software and external gating share the gating mode; that is,AI_External_Gate_Mode determines the mode of operation for both hardwareand software gating.Software and hardware gating can be used simultaneously without any specialsetup. The analog input operation proceeds when neither hardware nor softwaregate is in the pause state.