Delay with data transfer

Hallo,
I have bought a ZigBee Starter Kit with 2 RCM4510W modules. Everything works really well and I could also programm my first own programs to transfer data between the 2 modules. We want develop a small application to transfer some bits for a robot controller, and this requires nearly real time transfer of the data. Unfortunally I experienced some time delay with the data transfer at the application API_TEST.C, when I activate one of the buttons sw2 or sw3 on the prototyping board. The experience is that the first 5-8 signals are transfered immediatelly. But after that the device has a delay for the next signal of 2-4 seconds. Than it works again for some signals okay and after that I experience again the delay. Because I see the transfered/received data for source and receiver via terminal, I could see that the delay is coming from the sender. It looks for me if the sender is busy with an application and waits for resources to transfer the data, which results in the delay. Does anyone have experience with the sample API_TEST.C and can me explain what happens.

Best regards Uli