Hello,
I am experiencing a small issue with using two DaqMx in parallel.
I have one loop repeating with a 100 ms delay that records DAQ information from multiple pressure traducers and low meters. We are using one flow meter that outputs current, not voltage. This required two different DAQ acquisitions. We write the dynamic data to a text file once per loop. Despite a 100 ms delay, recording at 1000 or greater Hz is possible. To me this tells me that the dynamic data type stores data over time in a matrix and can upload an array of different time stamps to a file at once.
My problem comes from combining the two DAQ channels (voltage has about 5 inputs and current has only 1). For a 1000Hz frequency, we are getting a zero dataset every .401 ms (or potentially .400 if this data point does not accurately represent that one ms of data and it should not be there).
| Time |
PT 1 (Voltage) |
PT 2 (Voltage) |
PT 3 (Voltage) |
FM1 (Current) | ***** (Voltage) |
| 0.298 | 1047.753 | 427.907 | 0.782 | 0.134 | 0.014 |
| 0.299 | 1047.669 | 427.909 | 0.787 | 0.126 | 0.013 |
| 0.3 | 0 | 0 | 0 | 0.096 | 0 |
| 0.301 | 1047.689 | 427.927 | 0.813 | 0.082 | 0.013 |
| 0.302 | 1047.737 | 427.896 | 0.825 | 0.071 | 0.013 |
This also happens the other way where I get zero values for the current device but populated values for the rest. For this case they happen at 0.301 second intervals (or 0.30).
| Time | PT 1 (Voltage) | PT 2 (Voltage) | PT 3 (Voltage) | FM 1 (Current) |
FM 2 (Voltage) |
| 0.098 | 1047.501 | 427.797 | 0.981 | 0.107 | 0.013 |
| 0.099 | 1047.677 | 427.788 | 1.005 | 0.115 | 0.013 |
| 0.1 | 1047.793 | 427.784 | 0.992 | 0 | 0.012 |
| 0.101 | 1047.809 | 427.787 | 1.031 | 0.119 | 0.012 |
| 0.102 | 1047.857 | 427.765 | 0.998 | 0.113 | 0.012 |
How can I make these two communicate properly and prevent these 0 datapoints?
I am using labview 2015 and the following Daq code:
@meshein wrote:
Hello,
... We are using one flow meter that outputs current, not voltage. This required two different DAQ acquisitions. ....
I am using labview 2015 and the following Daq code:
Combine the two DAQ tasks into one and the complications should fall away.
Ben
Hello,
I have a few questions about your issue.
Does this really happen every 301 and 401 ms on the dot? Would you mind telling us what device your using for your DAQ measurement? Where are your stop tasks for the DAQmx functions?
~~~Hey, Magic 8-Ball!
Is "Sample Rate" an integer?~~~~
A: meshein should round that value.
Since the creation type is different (current vs voltage) and the sampling type is different (Differential vs RSE) is it possible to combine the tasks?
Yes, I compiled all the data into excel, filtered out all the bad data points for both cases and found the delta t between them. They were all the same! Which indicates that this is something to do with how the data compiles and the timing for when one extra data point gets added.
Sample rate is an integer. We use 1000. It is just specified as a double value.
@meshein wrote:
Sample rate is an integer. We use 1000. It is just specified as a double value.
No, it is just slightly less than 1000.000![]()
"Hold it a minute," you say "How the heck can Jeff's 8-Ball know that?"
Simple, I know how that not-shown "Merge Signals" works!
What is really happening is that you are merging 2 arrays of waveforms with identical dT's but slightly skewed T0s that are just less than an integer number of milliseconds. the merge signals re-samples the waveforms attempting to align the points.
Your skew comes from the dT between the two start task vis executing. you can minimize the skew like so:
So combining the error signal will synchronize them? Or do I also need to change the variable type from double to int?
Thank you for the insight!
What hardware are you using? I somehow doubt you have a single DAQ card for both tasks, otherwise you would be getting a resource conflict error. Are you using a cDAQ? If so, you can combine the tasks into a single one with no issues.