Chapter 4
Programming
4-50
©
National Instruments Corporation
generation begins by a trigger signal from
G_Gate
on PFI4. Confirm this
operation with an oscilloscope.
1.
Perform General Purpose Counter and Timer Example 1 Step 1
through 3.
2.
Call
MSC_Clock _Configure()
to set up the G_In_timebase2.
Clock_and_FOUT_Register
Slow_Internal_Timebase = 1
Slow_Internal_Time_Divide_By_2 = 1
Clock_To_Board = 1
Clock_To_Board_Divide_By_2 = 1
3.
Call
Cont_Pulse_Train_Generation()
to set up the DAQ-STC
for continuous pulse train generation.
Go_Mode_Register
G0_Load_Source=0;
G0_Load_A_Registers (24 bits)
G0_Load_A=0x0002; //delay from the trigger -1
G0_Command_Register
G0_Load=1;
G0_Load_A_Registers (24 bits)
G0_Load_A=0x0003; //pulse interval -1
G0_Load_B_Registers (24 bits)
G0_Load_B=0x0002; //pulse width -1
G0_Mode_Register
G0_Load_Source_Select=1;
G0_Input_Select_Register
G0_Source_Select=0; (G_In_TimeBase)
G0_Source_Polarity=0; (rising edges)
G0_Gate_Select=5; (PFI4)
G0_OR_Gate=0;
G0_Output_Polarity=0; (active high)
G0_Gate_Select_Load_Source=0;
G0_Mode_register