Chapter 3
Analog Output Timing/Control
DAQ-STC Technical Reference Manual
3-44
©
National Instruments Corporation
ao2_last_load_register
= A;
}
}
AO_UI2_TC_Interrupt_Ack = 1;
/*Check for interrupt latency problem*/
If (AO_UI2_TC_Error_St is 1) then
{
Inform user that a UI2_TC error has occurred;
AO_UI2_TC_Error_Confirm = 1
/*This is optional*/
}
}
3.6.8 Changing Update Rate during an Output Operation for
Secondary Analog Output
Use this function to change the update rate during an output operation if you are not
performing waveform staging. The variable
ao2_last_load_register
keeps track of
which load register should be used. This variable was introduced in the
AO2_Updating
function.
Function
AO2_Rate_Change
{
If
(ao2_last_load_register
is A)
{
If (AO_UI2_Next_Load_Source_St is 0) then
{
AO_UI2_Load_B = number of clocks between updates - 1;
Σ
AO_UI2_Switch_Load_Next_TC = 1;
ao2_last_load_register
= B;
}
Else
Inform user that rate change is impossible at this time;
}
Else
{
If (AO2_UI_Next_Load_Source_St is 1) then
{
AO_UI2_Load_A = number of clocks between updates - 1;
Σ
AO_UI2_Switch_Load_Next_TC = 1;
ao2_last_load_register
= A;
}
Else
Inform user that rate change is impossible at this time;
}
}