Jump to content
  • 0

How to acquire all the samples for each channel of an MCC118 DAQ-HAT


Sai Mouli
 Share

Question

Hello Everyone,

I am using Mcc118 with Raspberry-Pi in order to measure the voltages of 8-channels. Currently, I am running one of the examples programs named as continuous reading which scans and displays  the voltage samples for each channel at a given scan rate. However, the program only displays one value for a certain scan count. Take for example if I adjust the scan rate to 1Ks/S,I would be gaining only 1 sample for every 100-120 samples read. Or you could say that for a scan rate of 1000samples per sec you'd expect 1000 voltage readings to be displayed in     1 sec but I am only receiving 3 samples in for each second while it reads a 1000 samples. Is there any way to obtain all 1000 samples read in 1 second?. Please let me know. 

                                                  Thank You

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hell Sai,

The example program prints out one row or line of data from the data buffer and it does this for simplicity and because printing is a time consuming operation. Use your programming skills and modify the example so it prints all the data that was read.  To do this, you will need to know more about the a_in_scan_read function and this can be found in the MCC DAQ Hat Library Documentation. https://mccdaq.github.io/daqhats/index.html You will see that the function can return all the available data each time it's called or a lesser amount, it's up to you. It also will inform you what it has read so use the return variable to print all the data read. 

I wasn't sure if you are using Python or C so my answer is fairly generic.

Best regards,

John

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
 Share

×
×
  • Create New...