Chapter 3 Analog Output Timing/ControlDAQ-STC Technical Reference Manual3-32 ©National Instruments CorporationCall AO_Arming;Call AO_Start_The_Generation;}3.6.2 Waveform Staging for Primary Analog OutputWaveform staging can be used to generate timing for a waveform stage consisting of manyMISBs. The DAQ-STC has dual-load registers for each analog output counter so that thesoftware can load the parameters for the next MISB while the current MISB is still beingoutput. To accomplish this, program the BC_TC interrupt to call the AO_Staged_ISR ISR. Toenable the BC_TC interrupt, you must make sure that an interrupt level is dedicated to theinterrupt group B and that interrupt group B is enabled. Program the BC_TC interrupt andinterrupt group B as follows:{Interrupt_B_Output_Select = 0 through 7;Interrupt_B_Enable = 1;AO_BC_TC_Interrupt_Enable = 1;}Interrupts can normally be serviced after some delay, commonly referred to as interruptlatency. In some cases the interrupt latency may be long enough to cause problems in yourwaveform stage. If the interrupt cannot be serviced during one MISB of the waveform, theDAQ-STC will not be programmed properly for the next MISB. To avoid this, you shouldkeep interrupt latency and workload on your computer system in mind when programmingthe DAQ-STC for waveform staging. Although the DAQ-STC cannot eliminate the interruptlatency problem, it can detect when an excessive delay has occurred.Use this function for servicing the BC_TC interrupt during waveform staging. We assume thatthe parameters for each stage are stored in an array, defined as follows:bc_new_ticks /*contains the number buffer iterations in each MISB*/uc_new_ticks /*contains the number of updates in each buffer of the MISB*/ui_new_ticks /*contains the number of clocks between updates in each MISB*/new_mute_flag /*indicates whether the MISB will be muted (1 indicates muting)*/In addition, the variable ao_last_load_register keeps track of which load registersshould be used, and the variable ao_tick_count_to_use keeps track of which parameterin the array should be used. These variables were first introduced in the AO_Countingfunction.Function AO_Staged_ISR{Declare variablesnew_bc_ticks, /*number of buffer iterations*/new_uc_ticks, /*number of updates in each buffer*/