Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

sampling rate and message ratio

Rank

Total Posts: 11

Joined 2011-06-28

PM

for the sensrcore:
if i use this command to configure A/D
C [93][00][00][20] // Setting A/D Sample Rate at 4 Hz
C [91][00][00][41][00][01][00] // Configuring Data Channel 0 on ANT Channel 0 as Analog Input using pin(s) 00 reporting on 100.00% of messages
C [94][00][00][09][01][08][00][00] // Configuring Data Channel 0 A/D with reference setting of 9, sampling at 1.00 of sample rate, filter N value of 8

which means: sampling rate 4 Hz and messaging 100%
so does that means that each second ANT module will send
4 data packets that represent the 4 samples of the analogue inputs      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

Yes, as long as you set up your other channel parameters correctly, this should transmit at 4Hz in every message the analog output of AIO1.

Cheers      
Rank

Total Posts: 11

Joined 2011-06-28

PM

thanks for the answer, my question now is:
i configured the channel with channel period 1 Hz and sampling rate
of the ADC is 4HZ and the message ratio of the analogue data channel is 100% so in this case each seconds i should receive 4
data packets that represents the 4 sampling values.
But when i observed the slave side i found that there is only
1 message each seconds
this is the Script

[93][00][00][20] // Setting A/D Sample Rate at 4 Hz
[91][00][00][41][00][01][00] // Configuring Data Channel 0 on ANT Channel 0 as Analog Input using pin(s) 00 reporting on 100.00% of messages
[94][00][00][09][01][08][00][00] // Configuring Data Channel 0 A/D with reference setting of 9, sampling at 1.00 of sample rate, filter N value of 8
[42][00][10][00] // Assign Channel Master on ANT chanel 0 on network 0
[51][00][31][00][01][05] // Assign Channel ID 0, Dev. Num = 49, Dev. Type = 1, Trans. Type = 5
[43][00][00][80] // Set ANT Channel 0 Message Period to 1.00 Hz
[4B][00] // Open ANT chanel 0
// End Sector      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

The channel period will dictate the rate at which your master will transmit the data regardless of the sampling rate of the ADC.
The bandwidth of your total system measuring your signal will be capped by the lowest of the two rates.

If you would like to see four data messages per second, you must set the channel to 4 Hz.
[43][00][00][20] // Set ANT Channel 0 Message Frequency to 4.00 Hz

Cheers      
Rank

Total Posts: 11

Joined 2011-06-28

PM

thanks a lot, i hope this is my last question and sorry for that
so if the sampling rate was 4 Hz and the channel period was 1Hz
does that means the master will send only one sample from the
4 samples, or there is a buffer that allows the master to transmit the remained samples in the next time slot.
because in case of increasing the sample rate of ADC does that require increasing the channel period or there is a kind of buffer

the case here actually is not so clear to me. thanks a lot      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

That's absolutely correct, with a 1 Hz channel period, the ANT radio will only send one of the 4 samples. The channel period dictates the rate at which messages are transmitted, and each message contains only 1 sample. So with a 4 measurement per second sampling rate, but with the radio only transmitting 1 message per second, only 1 of those samples can be sent in that second, and the other 3 samples are discarded.

Ideally your channel period should match your sampling rate, so that you send every sample.

Cheers