Isn't DAQmxWriteCtrFreq only used for the AO? I think I have things figured out, except for how to smoothly change the frequency on the counter output. Here is a text clip of what I did for a test case to ramp the frequence up to 1000 hz.
Is there any way to alter the frequency without killing the task first and interrupting the wave shape? I next attempt may be to try to set the number of samples to a finite number, wait when the task is complete, then go through the process of recreating the task with a new frequencey, waiting... etc..
while(value < 1000)
{
Sleep(100);
CHECK_FOR_MESSAGES;
value += 20;
DAQmxStopTask(taskHandle2);
DAQmxClearTask(taskHandle2);
(DAQmxCreateTask("",&taskHandle2));
(DAQmxCreateCOPulseChanFreq(taskHandle2,"Dev1/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0.0,value ,0.50));
(DAQmxCfgImplicitTiming(taskHandle2,DAQmx_Val_ContSamps,1000));
(DAQmxStartTask(taskHandle2));
}
Thank for you help. It certainly is appreciated!
Regards,
Eric