Chapter 4
General-Purpose Counter/Timer
DAQ-STC Technical Reference Manual
4-30
©
National Instruments Corporation
{
Gi_Counting_Once = 0;
}
Else
{
/*Single pulse generation or single-triggered pulse generation*/
Gi_Counting_Once = 1;
}
Gi_Up_Down = 0;
Gi_Bank_Switch_Enable = 0;
Gi_Bank_Switch_Mode = 0;
Gi_TC_Interrupt_Enable = 0;
Gi_Gate_Interrupt_Enable = 0;
}
Use this function to program a counter for continuous pulse-train generation. Program the
Gi_Source to select the signal that you want to use as a reference clock. Program the Gi_Gate
to select the signal that you want to use as a hardware trigger.
Function
Continuous_Pulse_Train_Generation
{
Gi_Load_Source_Select = 0;
Gi_Load_A = delay from hardware trigger to first edge of pulse - 1;
∑
Gi_Load = 1;
∑
Gi_Load_A = pulse interval - 1;
Gi_Load_B = pulsewidth - 1;
Gi_Load_Source_Select = 1;
Gi_Source_Select = 0 (G_IN_TIMEBASE1) or 1 through 10 (PFI<0..9>) or
11 through 17 (RTSI_TRIGGER<0..6>) or 18 (IN_TIMEBASE2)
or 19 (other G_TC);
Gi_Source_Polarity = 0 (count rising edges) or 1 (count falling edges);
Gi_Gate_Select = 1 through 10 (PFI(0:9)) or 11 through 17 (RTSI_TRIGGER<0..6>) or
18 (AI START2) or 19 (UI2_TC) or 20 (other G_TC) or
21 (AI START1) or 31 (logic low);
Gi_OR_Gate = 0;
Gi_Output_Polarity = 0 (active low) or 1 (active high);
Gi_Gate_Select_Load_Source = 0;
Gi_Gate_Polarity = 0 (disable inversion) or 1 (enable inversion);
Gi_Output_Mode = 1 (one clock cycle output) or 2 (toggle on TC) or
3 (toggle on TC or gate);
Gi_Reload_Source_Switching = 1;
Gi_Loading_On_Gate = 0;
Gi_Loading_On_TC = 1;
Gi_Gating_Mode = 2;
Gi_Gate_On_Both_Edges = 0;
Gi_Trigger_Mode_For_Edge_Gate = 2;