02-18-2016 07:26 AM
Dennis_Knutson a écrit :
Why do you have the DAQmx Write inside a loop? If you set for continuous generation, you would only need to call the wire once.
continious generation ... how to set it in given setup ?
02-18-2016 07:31 AM
02-18-2016 08:06 AM
Well, I've tried with continuous generation option (please, see the scrrenshot below).
The problem persists.
02-18-2016 08:26 AM
GerdW a écrit :Hi Pavel,
I don't think this is a good solution!
- Dennis mentioned the problem of calling DAQmxWrite in a loop.
- Creating a waveform of 1000 samples / 1kHz samplerate with a frequency of 1.7Hz gives 1000/1.7=588 samples for one full period. The next "period" in the signal only has 412 samples left, so the duty will fail for the second part of the waveform… Simple math, eh?
In this setup the samplerate isn't 1kHz, but 1.7kHz (Freq. x 1000). So 1000 samples "cover" exactly 1 periode: 1/1700 * 1000 = 1.0/1.7 (the periode of specified frequency). Isn't it ?
02-18-2016 09:29 AM
02-18-2016 10:12 AM
So, can you confirm, that solution based on adaptation of the sampling rate to the signal frequency is not so bad ... and probably the only solution for managing fractional frequencies.
I've tried the suggestion proposed by Dennis and supported by you (i.e. specify continuos generation) ... at least as i understood it, but seems that it doesn't arrange affair.
Thanks