Varawut,
I am not sure which XBee modules you are working with as there are thee different ones for S2. But in general, Set one as the Coordinator (CE 1). The other two routers (Default) will associate to the coordinator.
Most 3rd party Arduino code that you will find have the radios in API Mode. You enable that by setting the ATAP command to 1.
Digi Support