06-07-2023 10:24 PM
Hello all,
I toggling digital output by every 50ms to set frequency of 10Hz for watchdog.
Used timed loop to calculate actual frequency deviation and observed frequency is deviating by more than 40% from set frequency (I set 10Hz and actually measuring in time loop in range of 6 to 14Hz).
I using NI9375 module to toggle digital output.
06-08-2023 06:02 AM
Hi Prashant, and welcome to the forum!
Unless you're running on a real-time system, the timed loop approach is not recommended and almost certainly won't do what you want. You can generate a 10 Hz watchdog by writing a digital waveform (for example, of 1 second length) using DAQmx Write (Digital Wfm 1Chan NSamp) and running in Continuous Samples mode. By default, it will repeatedly output the waveform until the task is stopped (that is, regeneration is allowed by default). This method uses the acquisition hardware clock and is likely to be much more accurate.
Andy
06-19-2023 01:38 AM
Hello Andy,
Thanks for the idea.
Do you have any sample example of creating digital waveform with some set frequency.
It could be really help us.
WR
Prashant
06-19-2023 01:53 AM