LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to acquire acceleration and temperature at the same time

Solved!
Go to solution

Hello,

 

I am trying to write a VI file to acquire acceleration and temperature at the same time. I am using NI 9234 (7 modules)  for acceleration and NI 9213 (all 15 TC channels) for temperature measurement. I am using a producer consumer architecture for the same. I have defined two tasks; one for all the accelerometers and another for all TCs. I am using two queues to write the data into a tdms file.

 

My problem is that the duration of data acquired for acceleration and temperature does not match. If I leave the "Number of Samples" option in DAQmx Read to default and run the vi for 5 seconds, I get only about 1.1 seconds of data for acceleration and 1.25 for TCs. If I define "Number of Samples" as 1000 for acceleration and 1 for TC, I get the acceleration data for 5 seconds, however, the TC data is acquired only for 3 seconds or so. Is there a way to get both the acceleration and TC data for 5 seconds when I run the program for 5 seconds?

 

Thanks for your time.

 

Regards,

Pradeep

0 Kudos
Message 1 of 6
(3,087 Views)

Why not just use 1 task?  I'm pretty sure you can do that with your cDAQ chassis.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,072 Views)
Solution
Accepted by topic author Pradm

Hi Prad,

 

the NI9213 allows for 1S/s in high-resolution mode for all channels. (See manual.)

The NI9234 allows for 1.6kS/s (minimum!) per channel. (See manual.)

Reading the manual is a great source of wisdom… 🙂

 

So to get 5s of data from both kind of modules you need to read ~8kS from your NI9234 and just 5S from your NI9213.

I would suggest to use two producer loops, one for the TC module, one, for the 9234 modules…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(3,059 Views)

Crossrulz,

 

Thanks for your quick reply.

 

I tried that. In this case, even temperature is sampled at 25600 S/s while the module is only capable of 75 S/s. I am not sure if the data is meaningful.

 

-Pradeep

0 Kudos
Message 4 of 6
(3,057 Views)
Solution
Accepted by topic author Pradm

GerdW wrote:

So to get 5s of data from both kind of modules you need to read ~8kS from your NI9234 and just 5S from your NI9213.

I would suggest to use two producer loops, one for the TC module, one, for the 9234 modules…


I would probably take it one more step and only have 1 queue for the logging loop.  Just add to the cluster an ID so the logging loop knows which channel to write to in the TDMS file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 6
(3,043 Views)

Thank you GerdW and crossrulz. Using two producer loops solved the problem.

 

-Pradeep

0 Kudos
Message 6 of 6
(3,012 Views)