Digital sensor rapid data acquisition | LabJack
 

Digital sensor rapid data acquisition

2 posts / 0 new
Last post
Zyjas
Zy Jas's picture
Digital sensor rapid data acquisition

Hello there,

I am working with a T7 board and ADXL345 digital accelerometer, currently the setup is acquiring the data with a C script running on PC via request-response, however, I have noticed that the acquisition is slow even when using a single sensor since 3 request-response calls have to be done in order to get X,Y,Z acceleration. Per second maximum I can squeeze ±400 readings. Is there a way to read multiple sensors with at least the same acquisition frequency or faster?

LabJack Support
labjack support's picture
As shown in our Lua example,

As shown in our Lua example, it is possible to use a single SPI write, delay, then SPI read call to get data from every axis:

https://github.com/labjack/labjack_kipling/blob/master/ljswitchboard-mod...

If you are using the Lua script example and reading data in C using the USER_RAM registers, I would instead recommend using SPI in C. There should not be any notable benefit to using the Lua script since you have communication overhead due to the USER_RAM reads. Our SPI docs have more information on the interface. We also have a loopback SPI example in our C examples:

https://labjack.com/support/datasheets/t-series/digital-io/spi

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