Chapter 2 Analog Input Timing/Control©National Instruments Corporation2-43DAQ-STC Technical Reference ManualAfter the programming sequence is complete, issue the following commands:AI_START_Polarity = 1;∑AI_START_Polarity = 0;}2.6.5 Change Scan Rate during an AcquisitionYou can change the scan rate if you do not have special requirements on the timing for theSTART1 to START in retriggerable analog input or if the acquisition is not retriggerable. Thiswill not work in the case of retriggerable analog input with nondefault START1 to STARTtiming. Assume that the sequence of START rates is stored in the array si_ticks, and thevariable si_ticks_pointer indicates the current position in the array. You can use thefollowing function to change the scan rate.Function AI_Scan_Rate_Change{If (acquisition is not retriggerable) OR (you will change the scan rate during anacquisition) then{If (si_last_load_register is 0) then{/*If the last load was from the last load register written to, it is all right to *//*change the rate Otherwise, you cannot change the rate*/If (AI_SI_Next_Load_Source_St is 0) then{AI_SI_Load_B = si_ticks[si_ticks_pointer] - 1;si_ticks_pointer + = 1;si_last_load_register = 1;If (switch SI load registers on TC) thenAI_SI_Switch_Load_On_TC = 1;ElseAI_SI_Switch_Load_On_SC_TC = 1;}ElseScan rate change cannot be performed;}Else{If (AI_SI_Next_Load_Source_St is 1) then{AI_SI_Load_A = si_ticks[si_ticks_pointer] - 1;si_ticks_pointer + = 1;si_last_load_register = 0;If (switch SI load registers on TC) thenAI_SI_Switch_Load_On_TC = 1;