Jump to content
  • 0

MCC172 multi hat continuous sampling issue


NicR

Question

I have a stack of 7 hats, I have read all the EEPROMS & they can all be seen when I list the hats. I have given each hat its own number using the jumpers on the board 0-6 with the MASTER being 0, all the lights are green.

I am using the multi_hat_synchtonous_scan code as my base & have changed DEVICE_COUNT = 7

The code was working fine for 2 hats but now I get a segmentation error during the trigger set up as soon as it tries to configure device 2.

The line that throws the error,

convert_chan_mask_to_string(chan_mask[device], chan_display[device]);

What am I missing here?

Edited by NicR
wrong device number, additional information
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Any idea why it would throw a segmentation error?

It falls over when checking

while (channel_mask > 0)

Isn't the channel mask the same for every device? What would be different for the 3rd device in the stack do you think?

EDIT::

I found it, I hadn't declared all the channels in the chan_mask declaration

Edited by NicR
Link to comment
Share on other sites

  • 0
On 2/27/2023 at 11:57 PM, JRys said:

hello,

convert_chan_mask_to_string simply converts the channel mask to a string for display purposes. It has nothing to do with the MCC 172. It can be found in daqhat_utils.h, which is in /daqhats/examples/C/. 

Best regards,

John

Hi John,

Thank you for clarifying the purpose of the `convert_chan_mask_to_string` function. I apologize for the confusion regarding its association with the MCC 172. Your explanation makes it clear that this function is used solely for converting the channel mask to a string for display purposes.

I appreciate you providing the location of the function in the `daqhat_utils.h` file, which is located in the `/daqhats/examples/C/` directory. This information will be helpful for anyone looking to locate the function.

Once again, thank you for your input and for clearing up any misconceptions. If you have any further information or insights to share, please feel free to do so here.

Best regards,
Jerry

Edited by yesjerryer
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...