How to perform several acquisition with different sample rate ?

조회 수: 1 (최근 30일)
Vincent Thevenot
Vincent Thevenot 2015년 10월 2일
답변: Leonard Classen 2019년 6월 18일
Hello,
I'm trying to perform 2 synchronous acquisitions in real-time (vibrations and temperature). I use NI cDAQ 9174 frame with a 9234 module for aacelerometer and a 9213 module for temperature, and I use the Data Acquisition ToolBox. For vibrations, I need a sample rate better than 20 kHz and for temperature, a sample rate of a few Hz.
In Matlab, when I create an AnalogInput session and I add 2 channels, the maximum sample rate is imposed by the lowest which is the temperature module, and is set to 100 Hz. It's not enough for vibrations. So I tried to create 2 sessions with 2 different sample rate. But how to launch acquisitions at the same time ?
I don't find how to perform several acquisition with different sample rate. I saw that we can eventually use triggers, but I'm not convinced (maybe I'm wrong, I didn't tried). I also saw the multithreading technics, but also I'm not convinced. It seems to be complicated for what I want to do.
I'm pretty surprised that it's not easier to perform these kind of measurement, and that there's not more informations on the web. I thought it's a classic configuration in data acquisition from sensors.
So, if anyone has an idea, it would be very helpful for me.
Thanks in advance
Vincent

답변 (2개)

Rohit Kudva
Rohit Kudva 2015년 10월 22일
Hi Vincent,
I understand that you are currently using NI cDAQ 9174 chassis with NI 9234 module for accelerometer and a NI 9213 module for measuring temperature and you want to set different sampling rate for the modules.
Unfortunately, this is not possible when channels from multiple modules are associated with the same DAQ session object. So for now, the only way is to have separate session for the modules.
In such a case, one can configure two separate sessions to trigger on an external trigger signal. This signal can also be generated by a counter output channel (pulse generation). But looking at the datasheet for NI 9234 and NI 9213, it seems that neither of them have a digital IO nor counter channel.
Regards,
Rohit

Leonard Classen
Leonard Classen 2019년 6월 18일
Hello,
I am having the same problem.
I use NI9203 at 10kHz and NI9319 at 100Hz. I have created two sessions for each module, but I don't know how to get the data from both acquisitions. I understand that I need a callback function for both sessions to start the background acquisition. However, I want to acquire each 0,5s 5000 from NI9203 and 50 samples from NI9319, respectively.
best regards
Leo

카테고리

Help CenterFile Exchange에서 Simultaneous and Synchronized Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by