# Please give me the relevance of change detect and sample rate

**URL:** <https://forums.digi.com/t/please-give-me-the-relevance-of-change-detect-and-sample-rate/12277>\
**Category:** XBee - 802.15.4\
**Tags:** xbee\
**Created:** [December 13, 2013, 7:56am UTC](https://forums.digi.com/t/please-give-me-the-relevance-of-change-detect-and-sample-rate/12277 "2013-12-13T07:56:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alliswell](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@alliswell](https://forums.digi.com/u/alliswell)\
**Post date:** [December 13, 2013, 7:56am UTC](https://forums.digi.com/t/please-give-me-the-relevance-of-change-detect-and-sample-rate/12277/1 "2013-12-13T07:56:11Z")

</div>

Please give me the use of change detect&sample rate feature of Xbee S2 module.If possible explain with one example.

---

<div class="post-metadata">

**Author:** ![trooper2](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@trooper2](https://forums.digi.com/u/trooper2)\
**Post date:** [December 14, 2013, 7:49am UTC](https://forums.digi.com/t/please-give-me-the-relevance-of-change-detect-and-sample-rate/12277/2 "2013-12-14T07:49:01Z")

</div>

Hello,

From the manual [http://ftp1.digi.com/support/documentation/90000976\_P.pdf:](http://ftp1.digi.com/support/documentation/90000976_P.pdf:)

Change Detection Sampling  
Modules can be configured to transmit a data sample immediately whenever a monitored digital IO pin changes  
state. The IC command is a bitmask that can be used to set which digital IO lines should be monitored for a  
state change. If one or more bits in IC is set, an IO sample will be transmitted as soon as a state change is  
observed in one of the monitored digital IO lines. Change detection samples are transmitted to the 64-bit  
address specified by DH and DL.

Periodic IO Sampling  
Periodic sampling allows an XBee/XBee-PRO module to take an IO sample and transmit it to a remote device at  
a periodic rate. The periodic sample rate is set by the IR command. If IR is set to 0, periodic sampling is  
disabled. For all other values of IR, data will be sampled after IR milliseconds have elapsed and transmitted to a  
remote device. The DH and DL commands determine the destination address of the IO samples. DH and DL can  
be set to 0 to transmit to the coordinator, or to the 64-bit address of the remote device (SH and SL). Only  
devices running API firmware can send IO data samples out their UART. Devices running AT firmware will  
discard received IO data samples.  
A sleeping end device will transmit periodic IO samples at the IR rate until the ST timer expires and the device  
can resume sleeping.
