Please give me the relevance of change detect and sample rate

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

Hello,

From the manual 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.