12-07-2010 04:58 PM - edited 12-07-2010 05:00 PM
I hope I'm correct in posting on this board. I have a problem I have not previously encountered in acquiring data on a cDAQ 9172 chassis using a 9234 for 2 analog inputs and a 9219 for four thermocouple inputs. Obviously the 9219 is not ideal as it has a relatively low sample rate (and I have a 9213 on the way), so I'm having to use AI.ADCTimingMode to isolate the channels on that module for "high speed" mode so I can get a sample rate that's adequate for my loading. The issue that is arising is that no matter what I do to specify a sample rate, the actual sample rate ends up being 1651.61 Hz, higher than the capabilities of the 9219, so I get an error. I have tried using the DAQmx property node to set the timing as well as the sample clock VI but neither works. The only source I can select is onboard, but when I check the source used it is cDAQ1Mod1/ai/SampleClock, even though I get an error when I try to supply that as the source to sample clock VI.
As it is, my VI runs in spite of this error and seems to produce accurate data, but the initial problem is with long tests I will have unnecessarily large data sets unless I start decimating my other data, and the secondary problem is that I can't get the program to run when I try to integrate my counter task. In that case, the error terminates execution and it acquires no data.
I've attached my VI minus the counter task (I'm on 8.5 and have the upgrade coming as well), as well as an image of a simplified version of the VI only attempting to specify parameters for one AI channel. I get the same result with it. I'm at a bit of a loss here as I've never had this issue before and it seems like there's something beyond rudimentary that I'm missing, so I would greatly appreciate any help anyone could provide. Thanks in advance.
Solved! Go to Solution.
12-07-2010 07:23 PM
Hi JohnnyF,
This is the right place for this question.
The NI 9234 specifications confirm that the minimum data rate using the internal master timebase is 1.652 kS/s. DAQmx coerces AI sample rates up to the next supported rate, so if you select a lower rate in a task that has a NI 9234 in it, DAQmx will use 1.652 kS/s.
However, this shouldn't cause the NI 9219 to return errors. When you use the NI 9234 and NI 9219 in the same task (as your VI is doing), DAQmx should return repeated data for the NI 9219, at the sample rate used by the NI 9234. The section on "Slow Sample Rate Modules" in the cDAQ-9172 manual explains this further.
Could you post more information about the errors you are getting?
Also, what version of NI-DAQmx are you using? (Your VI was saved in LabVIEW 8.5, so "I'm on 8.5" could be the LabVIEW version, the NI-DAQmx version, or both.)
Brad
12-07-2010 08:41 PM
Thanks for taking the time to reply, Brad. Sorry my previous post was short on info-I was in a bit of a hurry to leave work.
The 9219 isn't causing errors in the program I uploaded; the error comes in when I integrate the counter task. Its behavior seems to agree with what you mentioned and what is mentioned in the manual; see attached screen shot of some sample data.
When I add in the counter task I get error -200332. It says (paraphrasing since I can't remote into the computer at the moment):
You have requested 100 Hz.
This correlates to 1.62 kHz.
The maximum allowable value is ~49.95 Hz.
I can get the complete code and verbatim error message when I get into work tomorrow morning.
I am on LabView 8.5, as you noted, with NI-DAQmx version 8.6.0f5.
If you need added info I can gladly provide it. Thanks again for the help!
12-08-2010 10:20 AM - edited 12-08-2010 10:20 AM
I'm attaching the code with counter task included, which is what leads to the error. I am trying to synchronize the counter data with my AI data, hence the way I've configured things, but I'm certainly open to other options to accomplish this.
The error message I get verbatim is:
Error -200332 occurred at DAQmx Start Task.vi:2
Possible reason(s):
Measurements: Specified sample rate is higher than the fastest rate supported by the device.
Maximum Value: 49.951220
Device: cDAQ1
Task Name: _unnamedTask<108>
Thanks again for any help!
12-13-2010 02:46 PM
Howdy Johnny!
What module are you using for the counter task?
Regards,
12-13-2010 02:51 PM
Barron,
I'm using a 9401 module for my counter task.
Thanks.
12-15-2010 02:40 PM
Just to clarify: the error only occurs when you add in the counter task. So if you completely remove the counter task do both of the analog input tasks function correctly?
What happens if you remove one of th eanalog input task so there is either:
A) AI Voltage Task and the Counter task
or
B) AI Temp TC Task and the Counter task
Also, is the error occuring at the DAQmx Start Task the is on the analog task chain or the counter task chain?
Regards,
12-15-2010 04:22 PM
If I eliminate the TC task, the error disappears (I assume because this eliminates the low sampling rate module from the task?). In doing some more digging around the NI site it seems my issue may be related to the inability to use different sampling rates within a 9172 chassis, and that something like the 9178 chassis might resolve this issue.
Thanks.
12-15-2010 04:32 PM - edited 12-15-2010 04:34 PM
Hi JohnnyF,
I wouldn't be surprised if upgrading to the latest NI-DAQmx resolves this issue with the chassis that you already have. NI-DAQmx 8.5 was the first version that supported the NI 9219, and many bugs have been fixed in the 3.5+ years since NI-DAQmx 8.5 was released. Also, I didn't have any luck reproducing the error with a cut-down version of your code (no custom scales, queues, etc.) on DAQmx 9.2, but I didn't spend much time on it.
However, the cDAQ-9178 lets you put the two modules in separate tasks, which makes many things much easier.
Brad
12-15-2010 04:36 PM
Thanks for going to all the trouble of trying that. I'll get the newer version od NI-DAQmx up and running and see what that does for me.
Thanks again.