Hi NI Support,
I am using a 6602 card to generate continuous pulses for another counter to measure period of continuous square waves. My
code is working fine with traditional NI-DAQ and API call sequence is as follows.
GPCTR_Control(1, Num0, ND_RESET);
GPCTR_Set_Application(1, Num0, ND_PULSE_TRAIN_GNR);
GPCTR_Change_Parameter( 1, Num0, ND_SOURCE, ND_INTERNAL_100_KHZ);
GPCTR_Change_Parameter( 1, Num0, ND_SOURCE_POLARITY, ND_LOW_TO_HIGH);
GPCTR_Change_Parameter( 1, Num0, ND_START_TRIGGER,ND_ENABLED);
GPCTR_Change_Parameter( 1, Num0, ND_COUNT_1, 500000); //Value "500000" is not important
GPCTR_Change_Parameter( 1, Num0, ND_COUNT_2, 500000);
.
.
GPCTR_Control( 1, Num0, 1, ND_PROGRAM);
.
.
Data Acquision starts later by using
Select_Signal(id, ND_START_TRIGGER, ND_RTSI_0, ND_LOW_TO_HIGH);
Output of this counter is routed to the second counter for buffered period mesaurement. Sorry, I am not describing about the
second counter here.
I am facing some problems with DAQmx C API usage when I try to rewrite this applcation for DAQmx. Please see my new code.
DAQmxCreateTask"", taskHandle);
DAQmxCreateCOPulseChanTicks(taskHandle, "/Dev1/ctr0","","Dev1/100kHzTimebase",DAQmx_Val_Low,0.0,500000,500000);
DAQmxCfgDigEdgeStartTrig(taskHandle,
"",
//Which terminal to use here??? DAQmx_Val_Rising));
DAQmxCfgImplicitTiming(taskHandle, DAQmx_Val_ContSamps, 0);
.
.
DAQmxStartTask(taskHandle);
My doubt is,
"Which terminal can be used when configuring the start trigger?". RTSI_0 cannot be specified here because it can
be used
only after some time (say 10 seconds) only. So, is it possible to route the signal from RTSI_0 to another signal(like
ND_START_TRIGGER) which can be configured earlier?
Please help.
Thank you very much.
-vtp