Thanks Luke, I did figure out what to do with it,
For the record and benefit of those wh might search later:
as I found from another thread a link to which I wish I had not lost here is what needs to be done:
DAQmxCreateTask ("", &PWMHandle);
DAQmxCreateCOPulseChanFreq (PWMHandle, "Dev2/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, pwmfreq, exh_pos);
DAQmxCfgImplicitTiming(PWMHandle,DAQmx_Val_ContSamps,1000);
DAQmxStartTask(PWMHandle);
without the imlplicit timing function, it assumed a finite loop or something like that and therefore does not like to change the PWM duty cycle.
So it works now