Reading multiple sensors at different frequencies | LabJack
 

Reading multiple sensors at different frequencies

4 posts / 0 new
Last post
Zyjas
Zy Jas's picture
Reading multiple sensors at different frequencies

In my application, I use accelerometer and microphone sensors that have to be measured in high frequencies, additionally, I have a current sensor connected that will be measured in lower frequency 1 sample per second. What would be a viable solution to integrate this behavior in a single T7 for data collection? 

For background, I use C code that is executed in a PC which is connected to LJT7 via USB. 

Any tip would be greatly appreciated
 

LabJack Support
labjack support's picture
Most likely, you would need

Most likely, you would need to sample every analog input at a high frequency. It is not possible to sample with different frequencies unless you are timing the acquisition in software, and in that case you would be limited to using command-response communications (and <1000Hz sampling rates).

Also note that the T7 maximum sample rate is 100000 samples per second across all channels, so measuring two channels you would only be able to sample at 50000 samples per second. That would also assume you are using the ±10V range and lowest resolution setting for stream mode acquisition. Our data rates page has related information:

https://labjack.com/support/datasheets/t-series/appendix-a-1

The following pages have hardware considerations for your sensors:

https://labjack.com/support/app-notes/accelerometers

https://labjack.com/support/app-notes/measuring-current

Zyjas
Zy Jas's picture
Perhaps it would be simpler

Perhaps it would be simpler to use two T7, one with lower data rate acquisition like current sensor, temperature sensors and the other T7 for high rate data acquisition, for microphones probably the streaming is a viable solution. 

In terms of coding in C, the low rate for the current sensor and for example high rate such as accelerometer because it talks I2C protocol? Is there any example that I could follow where I could continuously measure current sensor and temperature sensors 1 sample per second and current sensor with at least 400 samples per second via command-response communication?

Thank you for quick responses. 

LabJack Support
labjack support's picture
We do not have any examples

We do not have any examples that do exactly what you want, but our write_read_loop_with_config.c example could be a good starting point for reading the AIN in a loop. That can be found in the .zip on the following page and under the basic examples directory:

https://labjack.com/support/software/examples/ljm/c