10-28-2010 12:03 PM
Hi evryone!
I am a bit lost...
We make the acquisition of voltage (sine wave, 3Hz) which I simulated by a waveform generation in my VI. We want to convert this analog signal to a TTL and output it with a multifunction DAQ (6230).
I only used Analog to Digital.vi and DAQmx write.vi and I can't get it to work... I get a TTL which is not 3Hz and only If I input a frequency like 3.07 and not 3.00 !!
Did I forget something ?
Thanks for helping
Christophe
10-28-2010 12:17 PM
[Edit Post]
Just to make sure I am sending the right values, I read the TTL with daqmx-read just after I write it (see VI). And I do not have the same things...
Christophe
10-28-2010 04:08 PM
Back with new infos!
I found a very interesting thread (see below) talking about the frequency problem I have.
The solution given in this thread is to use DAQmx rather than DAQ given multi threadding properties but I am already using DAQmx.
Christophe
PS : I must use a software solution even though I use M-series because the generation of the TTL is made after the acquisition of the analog voltage.
10-28-2010 04:47 PM
In your vi, you don't have DAQmx Timing setup. I don't know what the default value is. But the timing determines how fast the DAQ will output values. If not set correctly, you may see slight change in the output frequency. Another thing is that the timing is based on a master clock, like 50MHz. The clock gets divided down until it gets near the desired setting. So it may not be able to achieve 3KHz exactly. If you are getting 3.07KHz, this may be why. I don't know if there is anything you can do about it. Try using the timing vi and setting different sample rates.
10-28-2010
04:56 PM
- last edited on
04-23-2025
01:50 PM
by
Content Cleaner
Unfortunately, the digital I/O on the 6230 is only software-timed.
Are you trying to output a TTL signal at the same frequency as your input sine wave? If so, you could use a counter output and adjust the frequency on-the-fly. You can use an FFT to convert your voltage measurement to frequency, then use the peak value for the input of the counter output task.
Best Regards,
10-29-2010 01:41 AM
Thanks all for your answers!
I tried to use Daqmx Timing but every clock always gives the same error -200077 that I will investigate on the forum.
And yes, I am trying to output a TTL signal at the same frequency of the input sine. I will look into counters.
Christophe
10-29-2010 02:47 AM
I found that I can't use any sample clock with 6230...
I tried to had a counter with the rate set by the analog signal but I still need a sample clock. I used the Correlated Dig write with counter which doesn't work either with my hardware.
I really need your help
Christophe
10-29-2010 10:15 AM - edited 10-29-2010 10:15 AM
Hi Christophe,
Error -200077 is just telling you that setting the sample clock on your DO task is not supported (it is only software timed like I mentioned in my last post).
The counter method uses Implicit timing which is supported on the 6230. Please refer to the example that I linked in my previous post for help on getting started with the counter method.
Best Regards,