Daisy chain AD5206 and check number of channels

Hello, I am using an arduino to control an ad5206 through a web interface. My understanding is that the AD5206 allows for daisy chaining, so my next step, is to step my game up from 6 channels to 12 channels. Currently my web interface displays a "channel" for each related ad5206 channel. I would like to check how many channels are currently in the daisy chain, so that I can feed that value into a for loop, and generate the appropriate number of channels. My question is, is there something in the SPI library that would allow me to sort of "ping" the ad5206 channels so that my arduino would know how many channels are in my project, or is anybody here aware of a "hack" that would allow me to do such a task.

Thanks

You can fill all shift registers in the chain with a fixed pattern, e.g. all zeroes, then shift out a single 1 bit (sentinel), followed again by zeroes, and count the number of clock ticks it takes until that 1 is returned back from SDO. If each AD5206 has an 11 bit register, it will take 11 clock ticks for one device, 22 ticks for 2 devices, and so on.

Take care to leave all devices with valid data after this scan! You can output that valid data just after the 1 bit sentinel.

You sir are a hero. Thank you so much. I have asked alot of people about this to no avail. While your technique is above my current capabilities. I look forward to attempting it and learning more about C. Thank you.