08-29-2012 01:26 PM
I have written the attached VI to take data from two different channels, 1 being a loadcell, and the other being a encoder. I have my timing synced using the Load cell input. The question I have is that at different sampling rates for the program, my dt in my waveform data doesn't change.
As I understand it the dt of the waveform should coincide with the sampling rate. Am I missing something?
Thanks in advance for your help
Solved! Go to Solution.
08-29-2012 08:03 PM
The dt should be the inverse of the sample rate. If you're starting the VI then trying to change the sample rate and see dt change, that won't happen. But you should see different values for dt if you set different sample rates before running the VI.
08-30-2012 06:05 AM
Thanks for the response. Yes I have tried stopping the VI changing the Sample rate and then re-starting the VI. This is why I am puzzled as to why my dt stays the same. I am sure it is a coding problem, but I just don't see it.
08-30-2012 07:58 AM
Just because you are changing the control value does not mean that the DAQ is sampling at a different rate. You have to stop the tasks, set their sampling rate, and start back up in order to change how the DAQ is behaving. The dt is truely what the DAQ is sampling at.
08-30-2012 08:06 AM
crossrulz,
Here is what I am doing. I set the sample rate to 1000hz. Run the VI. Stop the VI. Change the Sample rate to 50hz. Run the VI. There is no change in dt. Am I missing something?
08-31-2012 07:45 AM
I'm not sure what to tell you. I made minor modifications to your VI in the setup for the acquisitions. Since I don't have the same transducers I modified it to just acquire a voltage on the analog input and count edges for the counter task. The value of dt changes when I change the sample rate between executions of the program. I ran it on a USB-6212.
09-04-2012 06:15 AM
Thanks for trying DAD, I think I may re-post the code in the DAQ forum, as this maybe a hardware issue with the way I am trying to sync the sample clocks. Right now I am still at a loss as to how my dt doesn't change.
09-06-2012 09:17 AM
Just to add to my investigation of this issue, I added a sample clock property node just after the DAQmx Timing.vi on the "Master Clock" my analog input channel. This is where my issue starts. I read the sampleClk.rate here and it constantly stays at 1612.9 no matter what I input to the timing VI as a rate.
I do stop the VI and change the sample rate and then re-execute the VI to see of it changes.
Any idea why I can't seem to control the Sample rate with the Timing VI?
09-07-2012 12:08 PM
What devices are you using? I am trying to recreate what you are experiencing and want to make it as close to what you are doing as possible.
09-07-2012 02:28 PM
I am using a Compact Daq with a 9237 strain module and a 9244 digital module. Thanks for you help