DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling rate problem on NI 9229

Solved!
Go to solution

Sorry for the delay, and I thank you for the precious help you bring us.

So I give you a return of what I did. Using the Average module as you advised, I was able to reduce the sampling rate, it ultimately made me realize that the problem didn't come from that and it raises another problem, apparently c the NI 9229 module that can't be used with the other modules in the data acquisition : I use a NI 9212 for temperature acquisition and a NI 9229 for voltage acquisition and I connect the two modules to a Write DATA module that collects data in ASCII format (ASCII, very important) and that's where it bug !!!
Even using the Average module I always get an error message.
Strangely, when I use the NI 9206 module (without the Average module) and even if the frequency between NI 9212 and NI 9206 is different but the program runs normally, I do not understand ??? !!!!

PS: the task created on NI MAX for the NI 9229 is continuous samples (imposed by NI MAX), on the other hand for the NI 9206 is 1 sample on demand.

Thank you again !

0 Kudos
Message 11 of 15
(2,514 Views)

The ASCII file formats want a value for each column in the row. You cannot skip columns (or cells). 

 

The band-aid for this is a module called Signal Adapt in the Special group. You can force the sample rates to to match the start times if the sample rates are the same, or you can do a linear interpolation to force the slower channel to pace up to the faster channel (on channel 0 of the module). 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 12 of 15
(2,507 Views)

Hello CJ,

So I tried to do as you explained, very well,  but I think the problem is in module NI 9229 because I used it in another program and there is an error message :

Capture1.PNG

Capture2.PNG

 

This message does not appear when I use the NI 9206 and they both acquire voltages. I wonder why this difference?

In my opinion the problem comes from the NI 9229 and the fact that on NI MAX when creating the task one cannot select option 1 sample on demand? As soon as I put this module in a program it almost always has a problem.

CJ I would like to have your opinion on it, the problem comes from where in your opinion?

0 Kudos
Message 13 of 15
(2,494 Views)
Solution
Accepted by topic author UTC-Aerospace

1. The message shows the reason for the error ("...resource...reserved...") -- you cannot use tasks that use "overlapping parts" of a hardware, e.g. if you use a device's ai0 in two different tasks.

 

2. Try to avoid using the 9229 for slow acquisition. It's minimum sampling rate is >1000 Hz.

Also it's a strange an odd sampling rate of 1612.9032 Hz that is difficult to handle with DASYLab.

 

3.

9229_9296_ASCII.jpg

DAQmx analog input: 9229, continuous mode, 1612.9032 Hz, BS 1000

DAQmx analog input 9206, 1 sample mode, the module has an input.

 

Each time the 9229 outputs a block of data (1000 values), the 9206 outputs a block of identical size, too. Also, the sampling rate is copied.

That makes writing into an ASCII file possible.

 

 

I have just simulted devices 9229, 9206 in MAX, so the following might not work with "real" hardware: try to set the sampling rate to 2000 Hz, BS 2000 for the continuous task that reads from the 9229.

In my simulated environment, the sampling rate is not rounded to the next odd sampling rate the device's manual explains (X * 1612.9032).

If using 2000Hz/BS 2000 works, you can use the separation module to get rid of 1999 values, letting one value pass. That'd reasult in 1 value per second.

 

 

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 14 of 15
(2,484 Views)

Hi hw70,
Then it works very well using the separate module as you told me.
But I would like to know for what it works with 2000 Hz, BS 2000 and not with for example 1000 Hz, BS 1000?
thank you !

0 Kudos
Message 15 of 15
(2,379 Views)