Jump to content
  • 0

To read analog signals from 52 channels (7 (DAQ 128) heads) at 5KS/s samples per channel.


ArjunNarayanan

Question

HI 

I tried the below attached code and was able to log data at a rate of 5kS/s from all 8 channels. But this works only for a single DAQ HAT since the code asks me to enter the DAQ HAT.

What should I do if I want to read all the 7 DAQ HAT attached. I would like to read and log the data of all the 52 channels without terminating the readings after a specific amount of sampling. I want to read all the 52 channels until I press ctr c to stop the readings like the one done in the below provided code.

Please suggest me a sample code for this.

Eagerly waiting for your helpful reply.

Regards

Arjun

cont_scan_csv.py

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Please have a look at the multi_hat_synchronuous_scan.py example. It demonstrates using two boards. The comment section provides a good description of its operation. You don't have to use an external clock & trigger, but it helps align the measurements from each board.

The maximum sample rate is dictated by the aggregate rate from all the boards. The data from each board is transmitted via a single SPI bus rated at 320k Sample/s.  Fifty-two channels times 5000 S/s put you under the maximum but doesn't leave a lot of room to do other things like write to files and update displays. 

Link to comment
Share on other sites

  • 0
On 11/21/2023 at 8:14 PM, JRys said:

Please have a look at the multi_hat_synchronuous_scan.py example. It demonstrates using two boards. The comment section provides a good description of its operation. You don't have to use an external clock & trigger, but it helps align the measurements from each board.

The maximum sample rate is dictated by the aggregate rate from all the boards. The data from each board is transmitted via a single SPI bus rated at 320k Sample/s.  Fifty-two channels times 5000 S/s put you under the maximum but doesn't leave a lot of room to do other things like write to files and update displays. 

HI

In the above said example the csv file is not getting generated. Can you please provide me a source code wherein i can read two or more hats at the same time and log all the incoming data to a csv file simultaneously. I am attaching the example code which i have edited to read two hats at the same time and log the data into a csv file. Please go through the code and let me know where i have gone wrong.

Also can a raspberry pi 4 with 8GB of RAM log the date as well as read all the 52 channels at the same time? (Currently i am using a raspberry pi 4 with 4GB of RAM and the OS is stored in a 16GB memory card.)

Or can you suggest some other microprocessor that is much better than raspberry pi 4 and that can log the date as well as read all the 52 channels at the same time?

Regards

Arjun

all channel scan with log

Edited by ArjunNarayanan
attachment edited
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...