Chapter 3
Analog Output Timing/Control
DAQ-STC Technical Reference Manual
3-34
©
National Instruments Corporation
}
ao_tick_count_to_use
=
ao_tick_count_to_use
+ 1;
AO_BC_TC_Interrupt_ack = 1;
If (
ao_shut_down_isr
is 2) then
{
/*Check for error between the last BC_TC of one stage and the trigger for the next
stage*/
If (AO_BC_TC_Trigger_Error_St is 1) then
{
Inform user that a BC_TC trigger error has occurred;
AO_BC_TC_Trigger_Error_Confirm = 1;/*This is optional*/
}
}
If (AO_BC_TC_Error_St is 1) then
{
Inform user that a BC_TC error has occurred;
/*You need to reprogram analog output circuitry to get things back on track*/
}
}
3.6.3 Changing Update Rate during an Output Operation for Primary
Analog Output Group
Use this function to change the update rate during an output operation if you are not
performing waveform staging. The variable
ao_last_load_register
keeps track of
which load registers should be used. This variable was first introduced in the
AO_Counting
function.
Function
AO_Rate_Change
{
Begin critical section;
If (
ao_last_load_register
is A)
{
If (AO_UI_Next_Load_Source_St is 0) then
{
AO_UI_Load_B = number of clocks between updates - 1;
If (change update rate immediately) then
AO_UI_Switch_Load_On_TC = 1;
Else if (change update rate at the end of the current MISB) then
AO_UI_Switch_Load_On_BC_TC = 1;
ao_last_load_register
= B;
}
Else
Inform user that rate change is impossible at this time;
}
Else
{