I'm evaluating using 2 MCC172 board to perform datalogging from 2 triaxial iepe accelerometers.
Given that every MCC172 has 2 channels and I need to sample x,y and z contribute from each accelerometer, I was looking into getting 3 boards. I'm gonna use C language.
I know that probably it's a dumb question, but I'm finding it hard to understand how C function
mcc172_a_in_scan_read
does really work.
From my understanding when I want to start a scan I select
int mcc172_a_in_scan_start(uint8_t address, uint8_t channel_mask, uint32_t samples_per_channel, uint32_t options)
function and I choose which channel i want to scan with the parameter:
uint8_t channel_mask
Now, it is my understanding that this function will create a buffer that I can subsequently access with the "read" function to get the values.
Only thing is that the "read" function does not have a parameter where I can define which channel of one board I want to read:
I can only select the MCC172 address. Am I missing something or does it mean that in some way the scans from both channels are written into the same buffer? And if so, in which way are they written so that I can retrieve samples from a single channel?
Question
dartek
Hello,
I'm evaluating using 2 MCC172 board to perform datalogging from 2 triaxial iepe accelerometers.
Given that every MCC172 has 2 channels and I need to sample x,y and z contribute from each accelerometer, I was looking into getting 3 boards. I'm gonna use C language.
I know that probably it's a dumb question, but I'm finding it hard to understand how C function
mcc172_a_in_scan_read
does really work.
From my understanding when I want to start a scan I select
int mcc172_a_in_scan_start(uint8_t address, uint8_t channel_mask, uint32_t samples_per_channel, uint32_t options)
function and I choose which channel i want to scan with the parameter:
uint8_t channel_mask
Now, it is my understanding that this function will create a buffer that I can subsequently access with the "read" function to get the values.
Only thing is that the "read" function does not have a parameter where I can define which channel of one board I want to read:
nt mcc172_a_in_scan_read(uint8_t address, uint16_t * status, int32_t samples_per_channel, double timeout, double * buffer, uint32_t buffer_size_samples, uint32_t * samples_read_per_channel)
I can only select the MCC172 address. Am I missing something or does it mean that in some way the scans from both channels are written into the same buffer? And if so, in which way are they written so that I can retrieve samples from a single channel?
Thanks in advance
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now